
/*
 * VistaLaBaguette.java
 *
 * Created on 09/08/2010, 18:48:54
 */
package panaderialabaguette.vista;
import excepciones.CantidadIncorrectaExcepcion;
import excepciones.CantidadNoDisponibleExcepcion;
import excepciones.CantidadVaciaExcepcion;
import excepciones.CodigoProductoExcepcion;
import excepciones.EfectivoIncorrectoExcepcion;
import excepciones.EfectivoInsuficienteExcepcion;
import excepciones.EfectivoVacioExcepcion;
import excepciones.NoSeSeleccionoProductoExcepcion;
import excepciones.NombreProductoExcepcion;
import excepciones.PrecioProductoExcepcion;
import excepciones.ProductoExcepcion;
import excepciones.ProductoNoDisponibleExcepcion;
import excepciones.StockExcepcion;
import excepciones.TicketAnuladoExcepcion;
import excepciones.VentaExcepcion;
import java.awt.Color;
import java.awt.Desktop;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.print.PrinterException;
import java.io.File;
import java.io.IOException;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.DefaultCellEditor;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumn;
import javax.swing.table.TableRowSorter;
import javax.swing.text.JTextComponent;
import panaderialabaguette.Empleado;
import panaderialabaguette.FormatoTabla;
import panaderialabaguette.FormatoTablaProducto;
import panaderialabaguette.Panaderia;
import panaderialabaguette.PanaderiaListener;
import panaderialabaguette.acerca.Acerca;
import panaderialabaguette.splash.SplashImprimir;

/**
 *
 * @author ESPINOZA-MORENO
 */
public class VistaLaBaguette extends JFrame implements PanaderiaListener {

        private Panaderia panaderia;


        public VistaLaBaguette() {
            this.panaderia = Panaderia.getPanaderia();
            panaderia.agregarPanaderiaListener(this);
            initComponents();
            this.setIconImage(Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource("imagenes/panadero.jpg")));
            this.setLocationRelativeTo(null);
            //this.setExtendedState(JFrame.MAXIMIZED_BOTH);
        
        }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jComboBox3 = new javax.swing.JComboBox();
        jPopupMenu1 = new javax.swing.JPopupMenu();
        jMenuItem15 = new javax.swing.JMenuItem();
        jLayeredPane1 = new javax.swing.JLayeredPane();
        salir = new javax.swing.JButton();
        panelDevolucion = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jPanel31 = new javax.swing.JPanel();
        jLabel71 = new javax.swing.JLabel();
        jTextField4 = new javax.swing.JTextField();
        jButton14 = new javax.swing.JButton();
        jScrollPane8 = new javax.swing.JScrollPane();
        jTable3 = new javax.swing.JTable();
        jScrollPane9 = new javax.swing.JScrollPane();
        jTable4 = new javax.swing.JTable();
        jButton16 = new javax.swing.JButton();
        cantidadADevolver = new javax.swing.JTextField();
        jButton17 = new javax.swing.JButton();
        jPanel39 = new javax.swing.JPanel();
        jLabel70 = new javax.swing.JLabel();
        jLabel73 = new javax.swing.JLabel();
        jLabel74 = new javax.swing.JLabel();
        numero2 = new javax.swing.JLabel();
        fecha2 = new javax.swing.JLabel();
        hora2 = new javax.swing.JLabel();
        jLabel72 = new javax.swing.JLabel();
        jButton22 = new javax.swing.JButton();
        jPanel10 = new javax.swing.JPanel();
        jLabel75 = new javax.swing.JLabel();
        jButton24 = new javax.swing.JButton();
        jLabel88 = new javax.swing.JLabel();
        jLabel89 = new javax.swing.JLabel();
        jLabel90 = new javax.swing.JLabel();
        jLabel91 = new javax.swing.JLabel();
        jPanel32 = new javax.swing.JPanel();
        jTextField2 = new javax.swing.JTextField();
        jButton4 = new javax.swing.JButton();
        jLabel47 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jPanel34 = new javax.swing.JPanel();
        nroTicket = new javax.swing.JLabel();
        fechaTicket = new javax.swing.JLabel();
        horaTicket = new javax.swing.JLabel();
        numero = new javax.swing.JLabel();
        fecha = new javax.swing.JLabel();
        hora = new javax.swing.JLabel();
        jLabel61 = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        jTextField3 = new javax.swing.JTextField();
        jButton6 = new javax.swing.JButton();
        jCheckBox3 = new javax.swing.JCheckBox();
        jComboBox1 = new javax.swing.JComboBox();
        jLabel49 = new javax.swing.JLabel();
        jPanel33 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        botonDevolucionPedido = new javax.swing.JButton();
        botonCanje = new javax.swing.JButton();
        botonDevolucionDinero = new javax.swing.JButton();
        jLabel16 = new javax.swing.JLabel();
        panelListado = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel15 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        botonListarProductos = new javax.swing.JButton();
        botonListarClientes = new javax.swing.JButton();
        botonListarVentas = new javax.swing.JButton();
        botonListarPedidos = new javax.swing.JButton();
        jPanel18 = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        tablaClienteMinorista = new javax.swing.JTable();
        jPanel19 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        tablaClienteMayorista = new javax.swing.JTable();
        jPanel38 = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jLabel67 = new javax.swing.JLabel();
        jButton11 = new javax.swing.JButton();
        jLabel69 = new javax.swing.JLabel();
        jButton12 = new javax.swing.JButton();
        jDateChooser1 = new com.toedter.calendar.JDateChooser();
        jDateChooser2 = new com.toedter.calendar.JDateChooser();
        jButton13 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jButton20 = new javax.swing.JButton();
        jLabel92 = new javax.swing.JLabel();
        jLabel93 = new javax.swing.JLabel();
        fechaDesde = new javax.swing.JLabel();
        fechaHasta = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jPanel37 = new javax.swing.JPanel();
        jTextField6 = new javax.swing.JTextField();
        jLabel68 = new javax.swing.JLabel();
        botonVolverMenuListado = new javax.swing.JButton();
        botonImprimir = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        tablaListadoProductos = new javax.swing.JTable();
        jLabel10 = new javax.swing.JLabel();
        panelVenta = new javax.swing.JPanel();
        jLabel22 = new javax.swing.JLabel();
        jPanel14 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        tablaProducto = new javax.swing.JTable();
        jPanel15 = new javax.swing.JPanel();
        jLabel46 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        campoProducto = new javax.swing.JTextField();
        jPanel25 = new javax.swing.JPanel();
        etiquetaEfectivo = new javax.swing.JLabel();
        jPanel26 = new javax.swing.JPanel();
        etiquetaCambio = new javax.swing.JLabel();
        botonEfectivo = new javax.swing.JButton();
        jLabel51 = new javax.swing.JLabel();
        campoCantidad = new javax.swing.JTextField();
        botonAgregar = new javax.swing.JButton();
        botonQuitar = new javax.swing.JButton();
        jScrollPane6 = new javax.swing.JScrollPane();
        tablaDetalleProducto = new javax.swing.JTable();
        jLabel52 = new javax.swing.JLabel();
        campoEfectivo = new javax.swing.JTextField();
        botonVaciarDetalle = new javax.swing.JButton();
        jLabel54 = new javax.swing.JLabel();
        botonCtaCte = new javax.swing.JButton();
        jLabel55 = new javax.swing.JLabel();
        botonImprimirComp = new javax.swing.JButton();
        botonRegistrar = new javax.swing.JButton();
        panelConfiguracion = new javax.swing.JPanel();
        jPanel27 = new javax.swing.JPanel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel28 = new javax.swing.JPanel();
        jButton3 = new javax.swing.JButton();
        jPanel29 = new javax.swing.JPanel();
        jLabel58 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jLabel59 = new javax.swing.JLabel();
        jPanel30 = new javax.swing.JPanel();
        jLabel60 = new javax.swing.JLabel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jPanel35 = new javax.swing.JPanel();
        jLabel56 = new javax.swing.JLabel();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jRadioButton3 = new javax.swing.JRadioButton();
        jPanel36 = new javax.swing.JPanel();
        jLabel65 = new javax.swing.JLabel();
        jRadioButton2 = new javax.swing.JRadioButton();
        jRadioButton1 = new javax.swing.JRadioButton();
        jLabel64 = new javax.swing.JLabel();
        jRadioButton4 = new javax.swing.JRadioButton();
        jButton2 = new javax.swing.JButton();
        jLabel57 = new javax.swing.JLabel();
        panelProducto = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        campoCodigo = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        campoNombre = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        campoDescripcion = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        campoPrecioUnitario = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        campoStock = new javax.swing.JTextField();
        botonAgregarProd = new javax.swing.JButton();
        comboUnidad = new javax.swing.JComboBox();
        btnVolver = new javax.swing.JButton();
        jLabel63 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel24 = new javax.swing.JLabel();
        jPanel17 = new javax.swing.JPanel();
        jLabel23 = new javax.swing.JLabel();
        campoCodigoProducto = new javax.swing.JTextField();
        botonElimniar = new javax.swing.JButton();
        botonVolver = new javax.swing.JButton();
        jScrollPane11 = new javax.swing.JScrollPane();
        jTable5 = new javax.swing.JTable();
        jLabel94 = new javax.swing.JLabel();
        jTextField7 = new javax.swing.JTextField();
        jLabel95 = new javax.swing.JLabel();
        jLabel96 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jTextField5 = new javax.swing.JTextField();
        jButton7 = new javax.swing.JButton();
        tablaProductoAModifica = new javax.swing.JScrollPane();
        campoDetalleProductoAModificar = new javax.swing.JTable();
        botonModificar = new javax.swing.JButton();
        buttonVolver = new javax.swing.JButton();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        jTextField9 = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        botonAgregarProducto = new javax.swing.JButton();
        botonModificarProducto = new javax.swing.JButton();
        botonEliminarProducto = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        panelCliente = new javax.swing.JPanel();
        jPanel21 = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jButton23 = new javax.swing.JButton();
        jLabel53 = new javax.swing.JLabel();
        jPanel24 = new javax.swing.JPanel();
        jLabel66 = new javax.swing.JLabel();
        jPanel23 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        campoNYA = new javax.swing.JTextField();
        jLabel40 = new javax.swing.JLabel();
        campoDNI = new javax.swing.JTextField();
        jLabel41 = new javax.swing.JLabel();
        campoCalle = new javax.swing.JTextField();
        jLabel42 = new javax.swing.JLabel();
        campoNro = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        campoDepto = new javax.swing.JTextField();
        jLabel44 = new javax.swing.JLabel();
        campoPiso = new javax.swing.JTextField();
        jLabel45 = new javax.swing.JLabel();
        campoTelefono = new javax.swing.JTextField();
        botonAgregarCliente = new javax.swing.JButton();
        jButton21 = new javax.swing.JButton();
        jLabel62 = new javax.swing.JLabel();
        jPanel22 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        campoRazonSocial = new javax.swing.JTextField();
        campoCuit = new javax.swing.JTextField();
        campoCalleCliente = new javax.swing.JTextField();
        jLabel33 = new javax.swing.JLabel();
        campoTitular = new javax.swing.JTextField();
        campoNroCliente = new javax.swing.JTextField();
        campoDeptoCliente = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        campoPisoCliente = new javax.swing.JTextField();
        jLabel35 = new javax.swing.JLabel();
        campoLocalidad = new javax.swing.JTextField();
        jLabel36 = new javax.swing.JLabel();
        campoEmail = new javax.swing.JTextField();
        jLabel37 = new javax.swing.JLabel();
        campoTel = new javax.swing.JTextField();
        jButton18 = new javax.swing.JButton();
        jButton19 = new javax.swing.JButton();
        jLabel50 = new javax.swing.JLabel();
        jPanel20 = new javax.swing.JPanel();
        jButton15 = new javax.swing.JButton();
        botonModificarCliente = new javax.swing.JButton();
        botonEliminarCliente = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        panelCtaCte = new javax.swing.JPanel();
        jLabel19 = new javax.swing.JLabel();
        panelPedido = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        botonModificarPedido = new javax.swing.JButton();
        botonEliminarPedido = new javax.swing.JButton();
        botonAgregarPedido = new javax.swing.JButton();
        jLabel18 = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jLabel76 = new javax.swing.JLabel();
        jTextField8 = new javax.swing.JTextField();
        jScrollPane10 = new javax.swing.JScrollPane();
        tablaCliente = new javax.swing.JTable();
        jButton25 = new javax.swing.JButton();
        jButton26 = new javax.swing.JButton();
        jButton27 = new javax.swing.JButton();
        jPanel40 = new javax.swing.JPanel();
        jLabel78 = new javax.swing.JLabel();
        jLabel79 = new javax.swing.JLabel();
        jLabel80 = new javax.swing.JLabel();
        jLabel81 = new javax.swing.JLabel();
        jLabel82 = new javax.swing.JLabel();
        jLabel83 = new javax.swing.JLabel();
        jLabel84 = new javax.swing.JLabel();
        jLabel85 = new javax.swing.JLabel();
        jLabel77 = new javax.swing.JLabel();
        jLabel86 = new javax.swing.JLabel();
        jLabel87 = new javax.swing.JLabel();
        jCheckBox4 = new javax.swing.JCheckBox();
        jDateChooser3 = new com.toedter.calendar.JDateChooser();
        jDateChooser4 = new com.toedter.calendar.JDateChooser();
        jPanel41 = new javax.swing.JPanel();
        jLabel99 = new javax.swing.JLabel();
        jLabel100 = new javax.swing.JLabel();
        jLabel101 = new javax.swing.JLabel();
        campoProductoPedido = new javax.swing.JTextField();
        jScrollPane12 = new javax.swing.JScrollPane();
        tablaProdPed = new javax.swing.JTable();
        jScrollPane13 = new javax.swing.JScrollPane();
        tablaPedido = new javax.swing.JTable();
        jLabel102 = new javax.swing.JLabel();
        jButton28 = new javax.swing.JButton();
        jButton29 = new javax.swing.JButton();
        jButton30 = new javax.swing.JButton();
        jDateChooser5 = new com.toedter.calendar.JDateChooser();
        jLabel103 = new javax.swing.JLabel();
        cantPedido = new javax.swing.JTextField();
        unidadProdPed = new javax.swing.JLabel();
        jPanel42 = new javax.swing.JPanel();
        jLabel104 = new javax.swing.JLabel();
        menuEmpleadoDeVentas = new javax.swing.JPanel();
        gestionVenta = new javax.swing.JButton();
        gestionClientes1 = new javax.swing.JButton();
        gestionDevoluciones1 = new javax.swing.JButton();
        listados1 = new javax.swing.JButton();
        cambiarDeUsuario1 = new javax.swing.JButton();
        menuGerente = new javax.swing.JPanel();
        gestionProductos = new javax.swing.JButton();
        gestionPedidos = new javax.swing.JButton();
        gestionStock = new javax.swing.JButton();
        gestionClientes = new javax.swing.JButton();
        gestionDevoluciones = new javax.swing.JButton();
        gestionCtaCte = new javax.swing.JButton();
        listados = new javax.swing.JButton();
        gestionUsuario = new javax.swing.JButton();
        gestionEmpleados = new javax.swing.JButton();
        menuAdministrador = new javax.swing.JPanel();
        cambiarDeUsuario = new javax.swing.JButton();
        gestionClientes2 = new javax.swing.JButton();
        gestionPedidos1 = new javax.swing.JButton();
        gestionProductos1 = new javax.swing.JButton();
        gestionDevoluciones2 = new javax.swing.JButton();
        listados2 = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        panelStock = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        panelLogin = new javax.swing.JPanel();
        registroDeUsuario = new javax.swing.JLabel();
        usuario = new javax.swing.JLabel();
        nombreusuario = new javax.swing.JTextField();
        contraseña = new javax.swing.JLabel();
        passwordUsuario = new javax.swing.JPasswordField();
        ingresar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem14 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenuItem7 = new javax.swing.JMenuItem();
        jMenuItem10 = new javax.swing.JMenuItem();
        jMenuItem12 = new javax.swing.JMenuItem();
        jMenuItem11 = new javax.swing.JMenuItem();
        jMenuItem9 = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        jMenuItem13 = new javax.swing.JMenuItem();

        jComboBox3.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "kgs.", "grs.", "unidad" }));

        jMenuItem15.setText("¿Qué es esto?");
        jMenuItem15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem15ActionPerformed(evt);
            }
        });
        jPopupMenu1.add(jMenuItem15);

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
        setTitle("La Baguette");
        setBounds(new java.awt.Rectangle(0, 0, 0, 0));
        setIconImage(getIconImage());
        setIconImages(null);
        setName(""); // NOI18N
        setResizable(false);
        addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                formMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                formMouseReleased(evt);
            }
        });
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        jLayeredPane1.setEnabled(false);

        salir.setText("Salir");
        salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                salirActionPerformed(evt);
            }
        });
        salir.setBounds(40, 630, 160, -1);
        jLayeredPane1.add(salir, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelDevolucion.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jPanel12.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel20.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo_devoluciones.png"))); // NOI18N

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel20, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 559, Short.MAX_VALUE)
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel20, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE)
        );

        jPanel31.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel71.setText("Ingrese número de ticket");

        jTextField4.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextField4KeyReleased(evt);
            }
        });

        jButton14.setText("Ver datos");
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });

        jTable3.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripción", "Cantidad", "Precio"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane8.setViewportView(jTable3);

        jTable4.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripción", "Cantidad", "Precio"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane9.setViewportView(jTable4);

        jButton16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/up.png"))); // NOI18N
        jButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton16ActionPerformed(evt);
            }
        });

        cantidadADevolver.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                cantidadADevolverKeyReleased(evt);
            }
        });

        jButton17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/down.png"))); // NOI18N
        jButton17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton17ActionPerformed(evt);
            }
        });

        jPanel39.setBorder(javax.swing.BorderFactory.createTitledBorder("Ticket"));

        jLabel70.setText("Número:");

        jLabel73.setText("Fecha:");

        jLabel74.setText("Hora:");

        javax.swing.GroupLayout jPanel39Layout = new javax.swing.GroupLayout(jPanel39);
        jPanel39.setLayout(jPanel39Layout);
        jPanel39Layout.setHorizontalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel39Layout.createSequentialGroup()
                .addGap(46, 46, 46)
                .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel74, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel73, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel70, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(hora2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(fecha2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(numero2, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel39Layout.setVerticalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel39Layout.createSequentialGroup()
                .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel70)
                    .addComponent(numero2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel73)
                    .addComponent(fecha2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel74)
                    .addComponent(hora2)))
        );

        jLabel72.setText("Cantidad");

        jButton22.setText("Registrar");
        jButton22.setEnabled(false);
        jButton22.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton22ActionPerformed(evt);
            }
        });

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "TOTAL A DEVOLVER", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel75.setFont(new java.awt.Font("Tahoma", 1, 36));
        jLabel75.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel75.setText("$ 0.00");

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel75, javax.swing.GroupLayout.DEFAULT_SIZE, 172, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addComponent(jLabel75, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jButton24.setText("Imprimir");
        jButton24.setEnabled(false);
        jButton24.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton24ActionPerformed(evt);
            }
        });

        jLabel88.setFont(new java.awt.Font("Tahoma", 0, 14));

        jLabel89.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel89.setText("Total vendido:");

        jLabel90.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel90.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel90.setText("Producto/s a devolver");

        jLabel91.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel91.setText("Productos devueltos");

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addComponent(jLabel71, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE)
                        .addGap(11, 11, 11)
                        .addComponent(jButton14)
                        .addGap(222, 222, 222))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel31Layout.createSequentialGroup()
                        .addComponent(jLabel72, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cantidadADevolver, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(19, 19, 19)
                        .addComponent(jButton16, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton17, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(136, 136, 136)
                        .addComponent(jLabel89)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel88, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addComponent(jPanel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79, Short.MAX_VALUE)
                        .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(40, 40, 40))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel31Layout.createSequentialGroup()
                        .addComponent(jButton24, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jButton22, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(62, 62, 62))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel31Layout.createSequentialGroup()
                        .addComponent(jLabel90, javax.swing.GroupLayout.DEFAULT_SIZE, 579, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel31Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 16, Short.MAX_VALUE)
                        .addComponent(jLabel91, javax.swing.GroupLayout.DEFAULT_SIZE, 563, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 547, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 547, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel71)
                    .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton14))
                .addGap(18, 18, 18)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(jLabel90)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(3, 3, 3)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jButton17, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                            .addComponent(jButton16, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                            .addComponent(cantidadADevolver, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jLabel72, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel88, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel89))))
                .addGap(12, 12, 12)
                .addComponent(jLabel91)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton24)
                    .addComponent(jButton22))
                .addContainerGap())
        );

        jPanel32.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jButton4.setText("Ver Datos");
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jLabel47.setText("Ingrese número de ticket");

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Codigo", "Nombre", "Descripción", "Cantidad", "Precio"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);
        jTable1.getColumnModel().getColumn(4).setResizable(false);

        jPanel34.setBorder(javax.swing.BorderFactory.createTitledBorder("Ticket"));

        nroTicket.setText("Número:");

        fechaTicket.setText("Fecha:");

        horaTicket.setText("Hora:");

        numero.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);

        fecha.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);

        hora.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);

        javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34);
        jPanel34.setLayout(jPanel34Layout);
        jPanel34Layout.setHorizontalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addGap(45, 45, 45)
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(horaTicket, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(fechaTicket, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(nroTicket, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(fecha, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .addComponent(numero, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .addComponent(hora, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel34Layout.setVerticalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nroTicket)
                    .addComponent(numero))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fechaTicket)
                    .addComponent(fecha))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(horaTicket)
                    .addComponent(hora))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel61.setText("Detalle");

        jLabel48.setText("Ingrese cantidad a devolver");

        jButton6.setText("Registrar");

        jCheckBox3.setText("Actualizar stock");

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4" }));

        jLabel49.setText("Seleccione tipo de devolución");

        javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32);
        jPanel32.setLayout(jPanel32Layout);
        jPanel32Layout.setHorizontalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel49, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel48, javax.swing.GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.TRAILING, 0, 76, Short.MAX_VALUE)
                            .addComponent(jTextField3, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addGap(18, 18, 18)
                        .addComponent(jCheckBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
                        .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 537, Short.MAX_VALUE)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jPanel34, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel32Layout.createSequentialGroup()
                                .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(18, 18, 18)
                        .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel61, javax.swing.GroupLayout.DEFAULT_SIZE, 537, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel32Layout.setVerticalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton4))
                .addGap(18, 18, 18)
                .addComponent(jPanel34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel61)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel48, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCheckBox3)
                    .addComponent(jButton6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel49)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(49, Short.MAX_VALUE))
        );

        jPanel33.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33);
        jPanel33.setLayout(jPanel33Layout);
        jPanel33Layout.setHorizontalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 557, Short.MAX_VALUE)
        );
        jPanel33Layout.setVerticalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 452, Short.MAX_VALUE)
        );

        jPanel8.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        botonDevolucionPedido.setText("Devolución de pedido");
        botonDevolucionPedido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonDevolucionPedidoActionPerformed(evt);
            }
        });

        botonCanje.setText("Canje");
        botonCanje.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonCanjeActionPerformed(evt);
            }
        });

        botonDevolucionDinero.setText("Devolución de dinero");
        botonDevolucionDinero.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonDevolucionDineroActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(botonDevolucionPedido, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(botonCanje, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(botonDevolucionDinero, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(42, 42, 42)
                .addComponent(botonDevolucionDinero, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonCanje, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonDevolucionPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(286, Short.MAX_VALUE))
        );

        jLabel16.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/devoluciones2.png"))); // NOI18N
        jLabel16.setText(" Devoluciones");

        this.panelDevolucion.setVisible(false);

        javax.swing.GroupLayout panelDevolucionLayout = new javax.swing.GroupLayout(panelDevolucion);
        panelDevolucion.setLayout(panelDevolucionLayout);
        panelDevolucionLayout.setHorizontalGroup(
            panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelDevolucionLayout.createSequentialGroup()
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(panelDevolucionLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, 734, Short.MAX_VALUE))
            .addGroup(panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelDevolucionLayout.createSequentialGroup()
                    .addContainerGap(177, Short.MAX_VALUE)
                    .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, 567, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDevolucionLayout.createSequentialGroup()
                    .addContainerGap(181, Short.MAX_VALUE)
                    .addComponent(jPanel32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDevolucionLayout.createSequentialGroup()
                    .addContainerGap(181, Short.MAX_VALUE)
                    .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        panelDevolucionLayout.setVerticalGroup(
            panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelDevolucionLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelDevolucionLayout.createSequentialGroup()
                    .addContainerGap(43, Short.MAX_VALUE)
                    .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, 461, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelDevolucionLayout.createSequentialGroup()
                    .addGap(46, 46, 46)
                    .addComponent(jPanel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelDevolucionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelDevolucionLayout.createSequentialGroup()
                    .addContainerGap(46, Short.MAX_VALUE)
                    .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel31.setVisible(false);
        jPanel32.setVisible(false);
        jPanel33.setVisible(false);

        panelDevolucion.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelDevolucion, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelListado.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel14.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/listados2.png"))); // NOI18N
        jLabel14.setText(" Listados");

        jPanel6.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo_listado2.jpg"))); // NOI18N

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, 551, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel15, javax.swing.GroupLayout.DEFAULT_SIZE, 425, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel4.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        botonListarProductos.setText("Listar Productos");
        botonListarProductos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonListarProductosActionPerformed(evt);
            }
        });

        botonListarClientes.setText("Listar Clientes");
        botonListarClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonListarClientesActionPerformed(evt);
            }
        });

        botonListarVentas.setText("Volúmen ventas");
        botonListarVentas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonListarVentasActionPerformed(evt);
            }
        });

        botonListarPedidos.setText("Listar Pedidos");
        botonListarPedidos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonListarPedidosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botonListarPedidos, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                    .addComponent(botonListarVentas, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                    .addComponent(botonListarClientes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE)
                    .addComponent(botonListarProductos, javax.swing.GroupLayout.DEFAULT_SIZE, 125, Short.MAX_VALUE))
                .addGap(16, 16, 16))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(39, 39, 39)
                .addComponent(botonListarProductos)
                .addGap(18, 18, 18)
                .addComponent(botonListarClientes)
                .addGap(18, 18, 18)
                .addComponent(botonListarVentas)
                .addGap(18, 18, 18)
                .addComponent(botonListarPedidos)
                .addContainerGap(263, Short.MAX_VALUE))
        );

        jPanel18.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jPanel7.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        tablaClienteMinorista.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nombre", "DNI", "Calle", "Número", "Depto", "Piso", "Telefono"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaClienteMinorista.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPane3.setViewportView(tablaClienteMinorista);
        tablaClienteMinorista.getColumnModel().getColumn(0).setMinWidth(100);
        tablaClienteMinorista.getColumnModel().getColumn(2).setMinWidth(150);
        tablaClienteMinorista.getColumnModel().getColumn(3).setMinWidth(80);
        tablaClienteMinorista.getColumnModel().getColumn(6).setMinWidth(100);
        //agregamos la capacidad de ordenar
        TableRowSorter ordenCliente = new TableRowSorter(tablaClienteMinorista.getModel());
        tablaClienteMinorista.setRowSorter(ordenCliente);

        jPanel7.setVisible(false);

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 540, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 345, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(57, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Clientes Minoristas", jPanel7);

        jPanel19.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        tablaClienteMayorista.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Razón social", "Titular", "C.U.I.T.", "Calle", "Número", "Depto", "Piso", "Localidad", "e-mail", "telefono"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaClienteMayorista.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPane4.setViewportView(tablaClienteMayorista);
        tablaClienteMayorista.getColumnModel().getColumn(0).setMinWidth(170);
        tablaClienteMayorista.getColumnModel().getColumn(1).setMinWidth(100);
        tablaClienteMayorista.getColumnModel().getColumn(2).setMinWidth(120);
        tablaClienteMayorista.getColumnModel().getColumn(3).setMinWidth(150);
        tablaClienteMayorista.getColumnModel().getColumn(8).setMinWidth(150);
        tablaClienteMayorista.getColumnModel().getColumn(9).setMinWidth(120);
        //agregamos la capacidad de ordenar
        TableRowSorter ordenClienteMay = new TableRowSorter(tablaClienteMayorista.getModel());
        tablaClienteMayorista.setRowSorter(ordenClienteMay);

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 540, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 344, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(58, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Clientes Mayoristas", jPanel19);

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 571, Short.MAX_VALUE)
            .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 571, Short.MAX_VALUE))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 447, Short.MAX_VALUE)
            .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 447, Short.MAX_VALUE))
        );

        jPanel38.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripción", "Unidad", "Cantidad Vendida", "Monto recaudado"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Float.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTable2.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPane7.setViewportView(jTable2);
        jTable2.getColumnModel().getColumn(1).setMinWidth(100);
        jTable2.getColumnModel().getColumn(2).setMinWidth(160);
        jTable2.getColumnModel().getColumn(4).setMinWidth(100);
        jTable2.getColumnModel().getColumn(5).setMinWidth(100);
        //agregamos la capacidad de ordenar
        TableRowSorter ordenVolumen = new TableRowSorter(jTable2.getModel());
        jTable2.setRowSorter(ordenVolumen);

        jLabel67.setText("Seleccione fecha desde");
        jLabel67.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);

        jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/imprimir.PNG"))); // NOI18N
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });

        jLabel69.setText("Seleccione fecha hasta");
        jLabel69.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);

        jButton12.setText("Ver datos");
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });

        jDateChooser1.setDateFormatString("dia/mes/año");
        jDateChooser1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jDateChooser1PropertyChange(evt);
            }
        });

        jDateChooser2.setDateFormatString("dia/mes/año");
        jDateChooser2.setEnabled(false);

        jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/guardar2.png"))); // NOI18N
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });

        jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/graficos.png"))); // NOI18N
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        jButton20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/volver.png"))); // NOI18N

        jLabel92.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel92.setText("Productos vendidos desde:");

        jLabel93.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel93.setText("hasta:");

        fechaDesde.setFont(new java.awt.Font("Tahoma", 1, 11));

        fechaHasta.setFont(new java.awt.Font("Tahoma", 1, 11));

        javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38);
        jPanel38.setLayout(jPanel38Layout);
        jPanel38Layout.setHorizontalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel38Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 555, Short.MAX_VALUE)
                    .addGroup(jPanel38Layout.createSequentialGroup()
                        .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton20, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel38Layout.createSequentialGroup()
                        .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel92, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE)
                            .addComponent(jLabel67, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE)
                            .addComponent(jLabel69, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jDateChooser2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
                            .addComponent(jDateChooser1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel38Layout.createSequentialGroup()
                                .addComponent(fechaDesde, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                        .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel38Layout.createSequentialGroup()
                                .addGap(173, 173, 173)
                                .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel38Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel93)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(fechaHasta, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap())
        );
        jPanel38Layout.setVerticalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel67, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jDateChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButton12)
                    .addComponent(jLabel69, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jDateChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel92, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(fechaDesde)
                    .addComponent(jLabel93)
                    .addComponent(fechaHasta))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jButton20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        jPanel5.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jPanel37.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Filtrar por", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 10))); // NOI18N

        jLabel68.setText("Nombre");

        javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37);
        jPanel37.setLayout(jPanel37Layout);
        jPanel37Layout.setHorizontalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel37Layout.createSequentialGroup()
                .addGap(69, 69, 69)
                .addComponent(jLabel68, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(334, Short.MAX_VALUE))
        );
        jPanel37Layout.setVerticalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel37Layout.createSequentialGroup()
                .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel68)
                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        botonVolverMenuListado.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/volver.png"))); // NOI18N
        botonVolverMenuListado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonVolverMenuListadoActionPerformed(evt);
            }
        });

        botonImprimir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/imprimir.PNG"))); // NOI18N
        botonImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonImprimirActionPerformed(evt);
            }
        });

        tablaListadoProductos.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripción", "Precio Unitario", "Unidad", "Stock"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Float.class, java.lang.String.class, java.lang.Integer.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaListadoProductos.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPane2.setViewportView(tablaListadoProductos);
        tablaListadoProductos.getColumnModel().getColumn(1).setMinWidth(100);
        tablaListadoProductos.getColumnModel().getColumn(2).setMinWidth(160);
        tablaListadoProductos.getColumnModel().getColumn(3).setMinWidth(80);
        FormatoTabla formato = new FormatoTabla();
        tablaListadoProductos.setDefaultRenderer(Integer.class, formato);

        //agregamos la capacidad de ordenar
        TableRowSorter orden = new TableRowSorter(tablaListadoProductos.getModel());
        tablaListadoProductos.setRowSorter(orden);

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel10.setForeground(new java.awt.Color(0, 0, 102));
        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel10.setText("Listado de Productos");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 551, Short.MAX_VALUE)
                    .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 551, Short.MAX_VALUE)
                    .addComponent(jPanel37, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(botonImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(botonVolverMenuListado, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel10)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel37, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(botonVolverMenuListado, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(botonImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout panelListadoLayout = new javax.swing.GroupLayout(panelListado);
        panelListado.setLayout(panelListadoLayout);
        panelListadoLayout.setHorizontalGroup(
            panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelListadoLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel14, javax.swing.GroupLayout.DEFAULT_SIZE, 734, Short.MAX_VALUE))
            .addGroup(panelListadoLayout.createSequentialGroup()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelListadoLayout.createSequentialGroup()
                    .addContainerGap(167, Short.MAX_VALUE)
                    .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelListadoLayout.createSequentialGroup()
                    .addGap(167, 167, 167)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelListadoLayout.createSequentialGroup()
                    .addGap(167, 167, 167)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        panelListadoLayout.setVerticalGroup(
            panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelListadoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel14)
                .addGap(17, 17, 17)
                .addGroup(panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelListadoLayout.createSequentialGroup()
                    .addContainerGap(51, Short.MAX_VALUE)
                    .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelListadoLayout.createSequentialGroup()
                    .addGap(51, 51, 51)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelListadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelListadoLayout.createSequentialGroup()
                    .addGap(51, 51, 51)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        jPanel18.setVisible(false);
        jPanel38.setVisible(false);
        jPanel5.setVisible(false);

        panelListado.setVisible(false);

        panelListado.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelListado, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelVenta.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel22.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/venta.png"))); // NOI18N
        jLabel22.setText(" Registrar Nueva Venta");

        jPanel14.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        tablaProducto.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripción", "Stock", "Unidad", "Precio"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaProducto.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaProductoMouseClicked(evt);
            }
        });
        jScrollPane5.setViewportView(tablaProducto);
        FormatoTablaProducto formatoProducto = new FormatoTablaProducto();
        tablaProducto.setDefaultRenderer(Object.class, formatoProducto);

        jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "TOTAL", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 13))); // NOI18N

        jLabel46.setFont(new java.awt.Font("Tahoma", 1, 36));
        jLabel46.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel46.setText("$ 0.00");

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel46, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addComponent(jLabel46)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel17.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel17.setText("Ingrese el  nombre del producto");

        campoProducto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoProductoKeyReleased(evt);
            }
        });

        jPanel25.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Efectivo", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        etiquetaEfectivo.setFont(new java.awt.Font("Tahoma", 1, 28));
        etiquetaEfectivo.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        etiquetaEfectivo.setText("$ 0.00");

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(etiquetaEfectivo, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addComponent(etiquetaEfectivo)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel26.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cambio", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

        etiquetaCambio.setFont(new java.awt.Font("Tahoma", 1, 28));
        etiquetaCambio.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        etiquetaCambio.setText("$ 0.00");

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(etiquetaCambio, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(etiquetaCambio)
                .addContainerGap())
        );

        botonEfectivo.setText("Efectivo");
        botonEfectivo.setEnabled(false);
        botonEfectivo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonEfectivoActionPerformed(evt);
            }
        });

        jLabel51.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel51.setText("Ingrese Cantidad");
        jLabel51.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);

        botonAgregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/agregar.png"))); // NOI18N
        botonAgregar.setToolTipText("Agregar producto");
        botonAgregar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAgregarActionPerformed(evt);
            }
        });

        botonQuitar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/quitar.png"))); // NOI18N
        botonQuitar.setToolTipText("Quitar producto");
        botonQuitar.setEnabled(false);
        botonQuitar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonQuitarActionPerformed(evt);
            }
        });

        tablaDetalleProducto.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripción", "Cantidad", "Subtotal"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane6.setViewportView(tablaDetalleProducto);

        jLabel52.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel52.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel52.setText("Efectivo");
        jLabel52.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);

        campoEfectivo.setFont(new java.awt.Font("Tahoma", 1, 14));

        botonVaciarDetalle.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/borrar.png"))); // NOI18N
        botonVaciarDetalle.setToolTipText("Vaciar venta");
        botonVaciarDetalle.setEnabled(false);
        botonVaciarDetalle.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonVaciarDetalleActionPerformed(evt);
            }
        });

        jLabel54.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel54.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel54.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);

        botonCtaCte.setText("Cta. Corriente");
        botonCtaCte.setEnabled(false);

        jLabel55.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel55.setText("Seleccione la forma de pago");

        botonImprimirComp.setText("Imprimir");
        botonImprimirComp.setEnabled(false);
        botonImprimirComp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonImprimirCompActionPerformed(evt);
            }
        });

        botonRegistrar.setText("Registrar");
        botonRegistrar.setEnabled(false);
        botonRegistrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonRegistrarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel51, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(campoCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel54, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 186, Short.MAX_VALUE)
                        .addComponent(botonAgregar, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(campoProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(botonQuitar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 405, Short.MAX_VALUE)
                        .addComponent(botonVaciarDetalle, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 485, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(botonImprimirComp, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE)
                            .addComponent(botonCtaCte, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(botonRegistrar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(botonEfectivo, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE)))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel52, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
                        .addGap(10, 10, 10)
                        .addComponent(campoEfectivo, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel55, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
                    .addComponent(jPanel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(campoProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel14Layout.createSequentialGroup()
                                .addGap(11, 11, 11)
                                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                        .addComponent(campoCantidad, javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jLabel51, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(jLabel54, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(botonAgregar))
                        .addGap(11, 11, 11)
                        .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 201, Short.MAX_VALUE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(campoEfectivo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel52))
                        .addGap(20, 20, 20)
                        .addComponent(jLabel55)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(botonEfectivo)
                            .addComponent(botonCtaCte))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(botonVaciarDetalle)
                    .addComponent(botonQuitar)
                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(botonRegistrar)
                        .addComponent(botonImprimirComp)))
                .addContainerGap())
        );

        this.panelVenta.setVisible(false);

        javax.swing.GroupLayout panelVentaLayout = new javax.swing.GroupLayout(panelVenta);
        panelVenta.setLayout(panelVentaLayout);
        panelVentaLayout.setHorizontalGroup(
            panelVentaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelVentaLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel22, javax.swing.GroupLayout.DEFAULT_SIZE, 734, Short.MAX_VALUE))
            .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelVentaLayout.setVerticalGroup(
            panelVentaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelVentaLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel22)
                .addGap(18, 18, 18)
                .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelVenta.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelVenta, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelConfiguracion.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jPanel27.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jButton3.setText("Aceptar");

        jPanel29.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jLabel58.setText("Escoja el valor con el cual desea identificar un producto con stock mínimo");

        jTextField1.setText("5");

        jLabel59.setText("Escoja el color con el cual se identificara el producto con stock mínimo");

        javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29);
        jPanel29.setLayout(jPanel29Layout);
        jPanel29Layout.setHorizontalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel29Layout.createSequentialGroup()
                        .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 278, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel58, javax.swing.GroupLayout.DEFAULT_SIZE, 359, Short.MAX_VALUE)
                    .addComponent(jLabel59, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(167, Short.MAX_VALUE))
        );
        jPanel29Layout.setVerticalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel58)
                .addGap(11, 11, 11)
                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel59)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jPanel30.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jLabel60.setText("Escoja el color con el cual se identificara el producto con stock nulo");

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel60, javax.swing.GroupLayout.PREFERRED_SIZE, 407, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(119, Short.MAX_VALUE))
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(jLabel60)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jCheckBox1.setSelected(true);
        jCheckBox1.setText("Identificar stock mínimo");

        jCheckBox2.setSelected(true);
        jCheckBox2.setText("Identificar stock nulo");

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jPanel30, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jCheckBox2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jCheckBox1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanel29, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap(175, Short.MAX_VALUE))
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(jCheckBox1)
                .addGap(7, 7, 7)
                .addComponent(jPanel29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE)
                .addComponent(jCheckBox2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton3)
                .addGap(44, 44, 44))
        );

        jTabbedPane2.addTab("Productos", jPanel28);

        jLabel56.setText("Seleccione el fondo para utilizar en la aplicación");

        jButton8.setText("Aplicar");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jButton9.setText("Examinar");
        jButton9.setEnabled(false);

        jRadioButton3.setText("Seleccionar fondo desde un archivo");
        jRadioButton3.setEnabled(false);

        jPanel36.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jLabel65.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo_icono2.jpg"))); // NOI18N

        jRadioButton2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });

        jRadioButton1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });

        jLabel64.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo_icono.PNG"))); // NOI18N

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel36Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jRadioButton1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel64, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jRadioButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel65, javax.swing.GroupLayout.PREFERRED_SIZE, 199, Short.MAX_VALUE))
                .addContainerGap(176, Short.MAX_VALUE))
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel36Layout.createSequentialGroup()
                .addComponent(jLabel65, 0, 0, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jRadioButton2))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel36Layout.createSequentialGroup()
                .addComponent(jLabel64)
                .addGap(18, 18, 18)
                .addComponent(jRadioButton1))
        );

        jRadioButton4.setSelected(true);
        jRadioButton4.setText("Seleccionar imagen predefinida");
        jRadioButton4.setVerifyInputWhenFocusTarget(false);

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel35Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel56, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel35Layout.createSequentialGroup()
                        .addComponent(jRadioButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel36, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jRadioButton4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(116, Short.MAX_VALUE))
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(jLabel56)
                .addGap(12, 12, 12)
                .addComponent(jRadioButton4)
                .addGap(7, 7, 7)
                .addComponent(jPanel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 40, Short.MAX_VALUE)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jRadioButton3)
                        .addComponent(jButton9))
                    .addComponent(jButton8, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(34, 34, 34))
        );

        jTabbedPane2.addTab("Fondo", jPanel35);

        jButton2.setText("Volver");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel27Layout.createSequentialGroup()
                .addGap(607, 637, Short.MAX_VALUE)
                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 738, Short.MAX_VALUE)
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel27Layout.createSequentialGroup()
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 402, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jButton2)
                .addContainerGap())
        );

        jLabel57.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel57.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/configuracion.png"))); // NOI18N
        jLabel57.setText("Personalizar");

        javax.swing.GroupLayout panelConfiguracionLayout = new javax.swing.GroupLayout(panelConfiguracion);
        panelConfiguracion.setLayout(panelConfiguracionLayout);
        panelConfiguracionLayout.setHorizontalGroup(
            panelConfiguracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelConfiguracionLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel57, javax.swing.GroupLayout.DEFAULT_SIZE, 734, Short.MAX_VALUE))
            .addComponent(jPanel27, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        panelConfiguracionLayout.setVerticalGroup(
            panelConfiguracionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelConfiguracionLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel57)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel27, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        panelConfiguracion.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelConfiguracion, javax.swing.JLayeredPane.DEFAULT_LAYER);
        panelConfiguracion.setVisible(false);

        panelProducto.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jPanel3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel3.setText("Ingrese los datos del nuevo producto");

        campoCodigo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                campoCodigoActionPerformed(evt);
            }
        });
        campoCodigo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                campoCodigoKeyPressed(evt);
            }
        });

        jLabel4.setText("Código (*)");

        jLabel5.setText("Nombre (*)");

        jLabel6.setText("Descripción  ");

        jLabel7.setText("Precio Unitario (*)");

        campoPrecioUnitario.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoPrecioUnitarioKeyReleased(evt);
            }
        });

        jLabel8.setText("Unidad (*)");

        jLabel9.setText("Stock (*)");

        campoStock.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoStockKeyReleased(evt);
            }
        });

        botonAgregarProd.setText("Agregar");
        botonAgregarProd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAgregarProdActionPerformed(evt);
            }
        });

        comboUnidad.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "kgs.", "grs.", "unidad" }));

        btnVolver.setText("Volver");
        btnVolver.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVolverActionPerformed(evt);
            }
        });

        jLabel63.setText("NOTA: los campos con (*) son obligatorios.");

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addContainerGap(37, Short.MAX_VALUE)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(campoDescripcion)
                            .addComponent(campoNombre)
                            .addComponent(campoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(64, 64, 64)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(botonAgregarProd, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(comboUnidad, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(campoStock)
                                .addComponent(campoPrecioUnitario, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE))
                            .addComponent(btnVolver, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(46, 46, 46))
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel63, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(297, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(49, 49, 49)
                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)
                            .addComponent(campoCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(campoNombre)
                            .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(campoDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel3Layout.createSequentialGroup()
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(campoPrecioUnitario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)
                            .addComponent(comboUnidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(campoStock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(27, 27, 27)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonAgregarProd)
                    .addComponent(btnVolver))
                .addGap(207, 207, 207)
                .addComponent(jLabel63)
                .addContainerGap())
        );

        jPanel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo_productos.png"))); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 517, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(109, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(30, Short.MAX_VALUE))
        );

        jPanel17.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel23.setText("Código del producto");

        campoCodigoProducto.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                campoCodigoProductoKeyPressed(evt);
            }
        });

        botonElimniar.setText("Eliminar");
        botonElimniar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonElimniarActionPerformed(evt);
            }
        });

        botonVolver.setText("Volver");
        botonVolver.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonVolverActionPerformed(evt);
            }
        });

        jTable5.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripción ", "Precio Unitario", "Unidad", "Stock"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                true, true, true, true, false, true
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane11.setViewportView(jTable5);

        jLabel94.setText("Nombre del producto");

        jLabel95.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel95.setText("Ingrese el código del producto que desea eliminar o su nombre");

        jLabel96.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel96.setText("Datos del Producto");

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel95, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel23, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                            .addComponent(jLabel94, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(campoCodigoProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(272, 272, 272))
                    .addComponent(jLabel96, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                        .addComponent(botonElimniar, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(botonVolver, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addComponent(jLabel95)
                .addGap(29, 29, 29)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel23)
                    .addComponent(campoCodigoProducto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel94)
                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(25, 25, 25)
                .addComponent(jLabel96)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonElimniar)
                    .addComponent(botonVolver))
                .addContainerGap(143, Short.MAX_VALUE))
        );

        jPanel16.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel11.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel11.setText("Ingrese el código del producto que desea modificar o el nombre del mismo");

        jTextField5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextField5ActionPerformed(evt);
            }
        });
        jTextField5.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField5KeyPressed(evt);
            }
        });

        jButton7.setText("Ver Datos");
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        campoDetalleProductoAModificar.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null}
            },
            new String [] {
                "Codigo", "Nombre", "Descripción", "Precio Unitario", "Unidad", "Stock"
            }
        ));
        campoDetalleProductoAModificar.setAutoscrolls(false);
        campoDetalleProductoAModificar.setEnabled(false);
        tablaProductoAModifica.setViewportView(campoDetalleProductoAModificar);
        TableColumn tableColumn= campoDetalleProductoAModificar.getColumnModel().getColumn(3);
        tableColumn.setCellEditor(new DefaultCellEditor(jComboBox3));

        botonModificar.setText("Modificar");
        botonModificar.setEnabled(false);
        botonModificar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonModificarActionPerformed(evt);
            }
        });

        buttonVolver.setText("Volver");
        buttonVolver.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonVolverActionPerformed(evt);
            }
        });

        jLabel97.setText("Código del producto");

        jLabel98.setText("Nombre del producto");

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 441, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(198, 198, 198))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                        .addComponent(botonModificar, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(buttonVolver, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(140, 140, 140))
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addComponent(jLabel98)
                        .addGap(18, 18, 18)
                        .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(378, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                        .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(tablaProductoAModifica, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE)
                            .addGroup(jPanel16Layout.createSequentialGroup()
                                .addComponent(jLabel97)
                                .addGap(22, 22, 22)
                                .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 158, Short.MAX_VALUE)
                                .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(155, 155, 155))))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jLabel11)
                .addGap(33, 33, 33)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel97)
                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton7))
                .addGap(18, 18, 18)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel98)
                    .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(47, 47, 47)
                .addComponent(tablaProductoAModifica, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonModificar)
                    .addComponent(buttonVolver))
                .addContainerGap(97, Short.MAX_VALUE))
        );

        jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        botonAgregarProducto.setText("Agregar Producto");
        botonAgregarProducto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAgregarProductoActionPerformed(evt);
            }
        });

        botonModificarProducto.setText("Modificar Producto");
        botonModificarProducto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonModificarProductoActionPerformed(evt);
            }
        });

        botonEliminarProducto.setText("Eliminar Producto");
        botonEliminarProducto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonEliminarProductoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botonAgregarProducto, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                    .addComponent(botonModificarProducto, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
                    .addComponent(botonEliminarProducto, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addComponent(botonAgregarProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonModificarProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonEliminarProducto, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(288, Short.MAX_VALUE))
        );

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/producto2.PNG"))); // NOI18N
        jLabel2.setText(" Productos");

        javax.swing.GroupLayout panelProductoLayout = new javax.swing.GroupLayout(panelProducto);
        panelProducto.setLayout(panelProductoLayout);
        panelProductoLayout.setHorizontalGroup(
            panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelProductoLayout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(panelProductoLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 814, Short.MAX_VALUE))
            .addGroup(panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelProductoLayout.createSequentialGroup()
                    .addContainerGap(249, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelProductoLayout.createSequentialGroup()
                    .addContainerGap(169, Short.MAX_VALUE)
                    .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelProductoLayout.createSequentialGroup()
                    .addContainerGap(250, Short.MAX_VALUE)
                    .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        panelProductoLayout.setVerticalGroup(
            panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelProductoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelProductoLayout.createSequentialGroup()
                    .addContainerGap(44, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelProductoLayout.createSequentialGroup()
                    .addContainerGap(44, Short.MAX_VALUE)
                    .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelProductoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelProductoLayout.createSequentialGroup()
                    .addContainerGap(44, Short.MAX_VALUE)
                    .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jPanel3.setVisible(false);
        jPanel17.setVisible(false);
        jPanel16.setVisible(false);

        panelProducto.setVisible(false);

        panelProducto.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelProducto, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelCliente.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jPanel21.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel26.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cliente_minorista.png"))); // NOI18N
        jLabel26.setText("Cliente Minorista");
        jLabel26.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel26.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jLabel26.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jLabel26.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel26MouseClicked(evt);
            }
        });

        jLabel25.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cliente_mayorista.png"))); // NOI18N
        jLabel25.setText("Cliente Mayorista");
        jLabel25.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jLabel25.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jLabel25.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jLabel25.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jLabel25MouseClicked(evt);
            }
        });

        jButton23.setText("Volver");
        jButton23.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton23ActionPerformed(evt);
            }
        });

        jLabel53.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel53.setText("Seleccione el tipo de cliente que desea agregar");

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel53, javax.swing.GroupLayout.DEFAULT_SIZE, 542, Short.MAX_VALUE)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                        .addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel21Layout.createSequentialGroup()
                        .addComponent(jButton23, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(66, 66, 66)))
                .addContainerGap())
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel53)
                .addGap(64, 64, 64)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel25, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(40, 40, 40)
                .addComponent(jButton23)
                .addContainerGap(121, Short.MAX_VALUE))
        );

        jPanel24.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel66.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel66.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo_clientes.png"))); // NOI18N

        javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
        jPanel24.setLayout(jPanel24Layout);
        jPanel24Layout.setHorizontalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel66, javax.swing.GroupLayout.DEFAULT_SIZE, 558, Short.MAX_VALUE)
        );
        jPanel24Layout.setVerticalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel66, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 451, Short.MAX_VALUE)
        );

        jPanel23.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel38.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel38.setText("Ingrese los siguientes datos");

        jLabel39.setText("Nombre y Apellido (*)");

        jLabel40.setText("D.N.I (*)");

        campoDNI.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                campoDNIKeyPressed(evt);
            }
        });

        jLabel41.setText("Calle (*)");

        jLabel42.setText("Número (*)");

        campoNro.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                campoNroKeyPressed(evt);
            }
        });

        jLabel43.setText("Depto.");

        jLabel44.setText("Piso");

        campoPiso.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                campoPisoKeyPressed(evt);
            }
        });

        jLabel45.setText("Teléfono (*)");

        botonAgregarCliente.setText("Agregar");
        botonAgregarCliente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAgregarClienteActionPerformed(evt);
            }
        });

        jButton21.setText("Volver");
        jButton21.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton21ActionPerformed(evt);
            }
        });

        jLabel62.setText("NOTA: los campos con (*) son obligatorios.");

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel23Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel38, javax.swing.GroupLayout.DEFAULT_SIZE, 534, Short.MAX_VALUE))
                    .addGroup(jPanel23Layout.createSequentialGroup()
                        .addGap(88, 88, 88)
                        .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jLabel45, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel44, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel43, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel42, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel41, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel40, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabel39, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(campoTelefono)
                            .addComponent(campoPiso)
                            .addComponent(campoDepto)
                            .addComponent(campoNro)
                            .addComponent(campoCalle)
                            .addComponent(campoDNI)
                            .addComponent(campoNYA, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel23Layout.createSequentialGroup()
                        .addContainerGap(311, Short.MAX_VALUE)
                        .addComponent(botonAgregarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(26, 26, 26)
                        .addComponent(jButton21, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel23Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel62, javax.swing.GroupLayout.PREFERRED_SIZE, 276, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel38)
                .addGap(30, 30, 30)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel39)
                    .addComponent(campoNYA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel40)
                    .addComponent(campoDNI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel41)
                    .addComponent(campoCalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel42)
                    .addComponent(campoNro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel43)
                    .addComponent(campoDepto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel44)
                    .addComponent(campoPiso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel45)
                    .addComponent(campoTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(44, 44, 44)
                .addComponent(jLabel62)
                .addGap(24, 24, 24)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton21)
                    .addComponent(botonAgregarCliente))
                .addContainerGap(34, Short.MAX_VALUE))
        );

        jPanel22.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel27.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel27.setText("Ingrese los siguientes datos");

        jLabel28.setText("Razón social (*)");

        jLabel29.setText("C.U.I.T (*)");

        jLabel30.setText("Calle (*)");

        jLabel31.setText("Número (*)");

        jLabel32.setText("Depto. ");

        jLabel33.setText("Titular o encargado (*)");

        campoNroCliente.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                campoNroClienteKeyPressed(evt);
            }
        });

        jLabel34.setText("Piso ");

        campoPisoCliente.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                campoPisoClienteKeyPressed(evt);
            }
        });

        jLabel35.setText("Localidad (*)");

        jLabel36.setText("e-mail (*)");

        jLabel37.setText("Teléfono");

        jButton18.setText("Agregar");
        jButton18.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton18ActionPerformed(evt);
            }
        });

        jButton19.setText("Volver");
        jButton19.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton19ActionPerformed(evt);
            }
        });

        jLabel50.setText("NOTA: Los campos con (*) son obligatorios");

        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
        jPanel22.setLayout(jPanel22Layout);
        jPanel22Layout.setHorizontalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel22Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel22Layout.createSequentialGroup()
                        .addComponent(jButton18, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(22, 22, 22)
                        .addComponent(jButton19, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel22Layout.createSequentialGroup()
                            .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jLabel34, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel31, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel28))
                            .addGap(22, 22, 22)
                            .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(campoPisoCliente)
                                .addComponent(campoDeptoCliente)
                                .addComponent(campoNroCliente)
                                .addComponent(campoCalleCliente)
                                .addComponent(campoCuit)
                                .addComponent(campoRazonSocial, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jLabel37, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel36, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel33, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel35))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(campoTel)
                                .addComponent(campoEmail)
                                .addComponent(campoLocalidad)
                                .addComponent(campoTitular, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addComponent(jLabel50, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 287, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(49, Short.MAX_VALUE))
        );
        jPanel22Layout.setVerticalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel22Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jLabel27)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campoRazonSocial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel33)
                    .addComponent(campoTitular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel28))
                .addGap(18, 18, 18)
                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(campoCuit)
                        .addComponent(jLabel29))
                    .addComponent(campoLocalidad)
                    .addComponent(jLabel35))
                .addGap(18, 18, 18)
                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel22Layout.createSequentialGroup()
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel30)
                            .addComponent(campoCalleCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel31)
                            .addComponent(campoNroCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel32)
                            .addComponent(campoDeptoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel34)
                            .addComponent(campoPisoCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel22Layout.createSequentialGroup()
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel36)
                            .addComponent(campoEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel37)
                            .addComponent(campoTel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(53, 53, 53)
                .addComponent(jLabel50)
                .addGap(26, 26, 26)
                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton18)
                    .addComponent(jButton19))
                .addGap(36, 36, 36))
        );

        jPanel20.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jButton15.setText("Agregar Cliente");
        jButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton15ActionPerformed(evt);
            }
        });

        botonModificarCliente.setText("Modificar Cliente");

        botonEliminarCliente.setText("Eliminar Cliente");

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton15, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)
                    .addComponent(botonModificarCliente, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)
                    .addComponent(botonEliminarCliente, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonModificarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonEliminarCliente, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(286, Short.MAX_VALUE))
        );

        jLabel12.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Msn( B & G ).png"))); // NOI18N
        jLabel12.setText(" Clientes");

        panelCliente.setVisible(false);

        javax.swing.GroupLayout panelClienteLayout = new javax.swing.GroupLayout(panelCliente);
        panelCliente.setLayout(panelClienteLayout);
        panelClienteLayout.setHorizontalGroup(
            panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelClienteLayout.createSequentialGroup()
                .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(panelClienteLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel12, javax.swing.GroupLayout.DEFAULT_SIZE, 734, Short.MAX_VALUE))
            .addGroup(panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelClienteLayout.createSequentialGroup()
                    .addGap(180, 180, 180)
                    .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelClienteLayout.createSequentialGroup()
                    .addContainerGap(184, Short.MAX_VALUE)
                    .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelClienteLayout.createSequentialGroup()
                    .addGap(180, 180, 180)
                    .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );
        panelClienteLayout.setVerticalGroup(
            panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelClienteLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel12)
                .addGap(13, 13, 13)
                .addGroup(panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel21, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelClienteLayout.createSequentialGroup()
                    .addContainerGap(52, Short.MAX_VALUE)
                    .addComponent(jPanel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelClienteLayout.createSequentialGroup()
                    .addContainerGap(53, Short.MAX_VALUE)
                    .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(panelClienteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelClienteLayout.createSequentialGroup()
                    .addGap(47, 47, 47)
                    .addComponent(jPanel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        jPanel21.setVisible(false);
        jPanel24.setVisible(false);
        jPanel23.setVisible(false);
        jPanel22.setVisible(false);

        panelCliente.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelCliente, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelCtaCte.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel19.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/en_construccion.jpg"))); // NOI18N

        this.panelCtaCte.setVisible(false);

        javax.swing.GroupLayout panelCtaCteLayout = new javax.swing.GroupLayout(panelCtaCte);
        panelCtaCte.setLayout(panelCtaCteLayout);
        panelCtaCteLayout.setHorizontalGroup(
            panelCtaCteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, 744, Short.MAX_VALUE)
        );
        panelCtaCteLayout.setVerticalGroup(
            panelCtaCteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel19, javax.swing.GroupLayout.DEFAULT_SIZE, 504, Short.MAX_VALUE)
        );

        panelCtaCte.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelCtaCte, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelPedido.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jPanel9.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        botonModificarPedido.setText("Modificar Pedido");
        botonModificarPedido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonModificarPedidoActionPerformed(evt);
            }
        });

        botonEliminarPedido.setText("Eliminar Pedido");
        botonEliminarPedido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonEliminarPedidoActionPerformed(evt);
            }
        });

        botonAgregarPedido.setText("Agregar Pedido");
        botonAgregarPedido.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAgregarPedidoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botonAgregarPedido, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
                    .addComponent(botonEliminarPedido, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE)
                    .addComponent(botonModificarPedido, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGap(38, 38, 38)
                .addComponent(botonAgregarPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonModificarPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonEliminarPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(289, Short.MAX_VALUE))
        );

        jLabel18.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/pedido2.PNG"))); // NOI18N
        jLabel18.setText(" Pedidos");

        jPanel13.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel21.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo_pedido.png"))); // NOI18N

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, 566, Short.MAX_VALUE)
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel21, javax.swing.GroupLayout.DEFAULT_SIZE, 454, Short.MAX_VALUE)
        );

        jPanel11.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel76.setText("Ingrese el nombre del cliente");

        jTextField8.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jTextField8KeyPressed(evt);
            }
        });

        tablaCliente.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null, null, null, null, null}
            },
            new String [] {
                "Nombre", "Titular", "DNI", "CUIT", "Calle", "Nro", "Depto", "Piso", "Localidad", "email", "Telefono"
            }
        ));
        tablaCliente.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPane10.setViewportView(tablaCliente);

        jButton25.setText("Siguiente");

        jButton26.setText("Cancelar");

        jButton27.setText("Agregar Cliente");
        jButton27.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton27ActionPerformed(evt);
            }
        });

        jPanel40.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos del pedido", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel78.setText("Cliente:");

        jLabel79.setText("Fecha inicio:");

        jLabel80.setText("Fecha fin:");

        jLabel81.setText("Tipo pedido:");

        jLabel82.setText("jLabel82");

        jLabel83.setText("jLabel83");

        jLabel84.setText("jLabel84");

        jLabel85.setText("jLabel85");

        javax.swing.GroupLayout jPanel40Layout = new javax.swing.GroupLayout(jPanel40);
        jPanel40.setLayout(jPanel40Layout);
        jPanel40Layout.setHorizontalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel40Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel40Layout.createSequentialGroup()
                        .addComponent(jLabel80)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel84, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
                    .addGroup(jPanel40Layout.createSequentialGroup()
                        .addComponent(jLabel79)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel83, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel40Layout.createSequentialGroup()
                        .addComponent(jLabel78)
                        .addGap(27, 27, 27)
                        .addComponent(jLabel82, javax.swing.GroupLayout.DEFAULT_SIZE, 156, Short.MAX_VALUE))
                    .addGroup(jPanel40Layout.createSequentialGroup()
                        .addComponent(jLabel81)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel85, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel40Layout.setVerticalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel40Layout.createSequentialGroup()
                .addContainerGap(24, Short.MAX_VALUE)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel78)
                    .addComponent(jLabel82))
                .addGap(18, 18, 18)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel79)
                    .addComponent(jLabel83))
                .addGap(18, 18, 18)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel80)
                    .addComponent(jLabel84))
                .addGap(18, 18, 18)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel81)
                    .addComponent(jLabel85))
                .addContainerGap())
        );

        jLabel77.setText("Si el cliente no existe puede crearlo");

        jLabel86.setText("Ingrese fecha de inicio");

        jLabel87.setText("Ingrese fecha fin");
        jLabel87.setEnabled(false);

        jCheckBox4.setText("Pedido Planificado");
        jCheckBox4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jCheckBox4.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        jCheckBox4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox4ActionPerformed(evt);
            }
        });

        jDateChooser3.setMinSelectableDate(new java.util.Date());
        jDateChooser3.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jDateChooser3PropertyChange(evt);
            }
        });

        jDateChooser4.setEnabled(false);

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 543, Short.MAX_VALUE)
                            .addGroup(jPanel11Layout.createSequentialGroup()
                                .addComponent(jLabel76, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabel77)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton27)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel11Layout.createSequentialGroup()
                                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel87)
                                    .addComponent(jLabel86))
                                .addGap(34, 34, 34)
                                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jDateChooser3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jDateChooser4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 50, Short.MAX_VALUE)
                                .addComponent(jPanel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel11Layout.createSequentialGroup()
                                .addComponent(jButton26)
                                .addGap(61, 61, 61)
                                .addComponent(jButton25)))
                        .addGap(22, 22, 22))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jCheckBox4)
                        .addContainerGap(442, Short.MAX_VALUE))))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel76)
                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton27)
                    .addComponent(jLabel77))
                .addGap(35, 35, 35)
                .addComponent(jCheckBox4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 15, Short.MAX_VALUE)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jPanel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton25)
                            .addComponent(jButton26)))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel86)
                            .addComponent(jDateChooser3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(23, 23, 23)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel87)
                            .addComponent(jDateChooser4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );

        jPanel41.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        jLabel99.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel99.setForeground(new java.awt.Color(0, 0, 153));
        jLabel99.setText("-> Nuevo Pedido de Productos");

        jLabel100.setText("Seleccione los productos que desea incorporar al pedido");

        jLabel101.setText("Ingrese el nombre del producto");

        campoProductoPedido.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                campoProductoPedidoKeyReleased(evt);
            }
        });

        tablaProdPed.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Código", "Nombre", "Descripcion", "Cantidad", "Precio"
            }
        ));
        tablaProdPed.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaProdPedMouseClicked(evt);
            }
        });
        jScrollPane12.setViewportView(tablaProdPed);

        tablaPedido.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Codigo", "Nombre", "Descripcion", "Cantidad", "Precio"
            }
        ));
        jScrollPane13.setViewportView(tablaPedido);

        jLabel102.setText("Productos del pedido");

        jButton28.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/up.png"))); // NOI18N
        jButton28.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton28ActionPerformed(evt);
            }
        });

        jButton29.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/down.png"))); // NOI18N
        jButton29.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton29ActionPerformed(evt);
            }
        });

        jButton30.setText("Asignar pedido a cliente");

        jLabel103.setFont(new java.awt.Font("Tahoma", 1, 11));
        jLabel103.setText("Ingrese cantidad");

        jPanel42.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "TOTAL PEDIDO", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel104.setFont(new java.awt.Font("Tahoma", 1, 36));
        jLabel104.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel104.setText("$ 0.00");

        javax.swing.GroupLayout jPanel42Layout = new javax.swing.GroupLayout(jPanel42);
        jPanel42.setLayout(jPanel42Layout);
        jPanel42Layout.setHorizontalGroup(
            jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel104, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE)
        );
        jPanel42Layout.setVerticalGroup(
            jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel104, javax.swing.GroupLayout.DEFAULT_SIZE, 50, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel41Layout = new javax.swing.GroupLayout(jPanel41);
        jPanel41.setLayout(jPanel41Layout);
        jPanel41Layout.setHorizontalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel41Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel41Layout.createSequentialGroup()
                        .addComponent(jDateChooser5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 316, Short.MAX_VALUE)
                        .addComponent(jButton30))
                    .addComponent(jScrollPane13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)
                    .addGroup(jPanel41Layout.createSequentialGroup()
                        .addComponent(jLabel102, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(57, 57, 57)
                        .addComponent(jButton28, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(6, 6, 6)
                        .addComponent(jButton29, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(319, 319, 319))
                    .addGroup(jPanel41Layout.createSequentialGroup()
                        .addComponent(jLabel103)
                        .addGap(18, 18, 18)
                        .addComponent(cantPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(unidadProdPed))
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)
                    .addGroup(jPanel41Layout.createSequentialGroup()
                        .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel99, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)
                            .addComponent(jLabel100, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)
                            .addGroup(jPanel41Layout.createSequentialGroup()
                                .addComponent(jLabel101)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(campoProductoPedido, javax.swing.GroupLayout.PREFERRED_SIZE, 157, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(30, 30, 30)
                        .addComponent(jPanel42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel41Layout.setVerticalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel41Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel41Layout.createSequentialGroup()
                        .addComponent(jLabel99)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel100)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel101)
                            .addComponent(campoProductoPedido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanel42, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(33, 33, 33)
                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(17, 17, 17)
                .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel103)
                    .addComponent(cantPedido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(unidadProdPed, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton29, 0, 0, Short.MAX_VALUE)
                    .addGroup(jPanel41Layout.createSequentialGroup()
                        .addGap(8, 8, 8)
                        .addComponent(jLabel102))
                    .addComponent(jButton28, javax.swing.GroupLayout.PREFERRED_SIZE, 22, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jButton30)
                    .addComponent(jDateChooser5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        this.panelPedido.setVisible(false);

        javax.swing.GroupLayout panelPedidoLayout = new javax.swing.GroupLayout(panelPedido);
        panelPedido.setLayout(panelPedidoLayout);
        panelPedidoLayout.setHorizontalGroup(
            panelPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPedidoLayout.createSequentialGroup()
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(panelPedidoLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jLabel18, javax.swing.GroupLayout.DEFAULT_SIZE, 734, Short.MAX_VALUE))
            .addGroup(panelPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelPedidoLayout.createSequentialGroup()
                    .addGap(175, 175, 175)
                    .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPedidoLayout.createSequentialGroup()
                    .addContainerGap(168, Short.MAX_VALUE)
                    .addComponent(jPanel41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        panelPedidoLayout.setVerticalGroup(
            panelPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPedidoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel18)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(panelPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelPedidoLayout.createSequentialGroup()
                    .addGap(46, 46, 46)
                    .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addGroup(panelPedidoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(panelPedidoLayout.createSequentialGroup()
                    .addContainerGap(40, Short.MAX_VALUE)
                    .addComponent(jPanel41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        this.jPanel11.setVisible(false);

        panelPedido.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelPedido, javax.swing.JLayeredPane.DEFAULT_LAYER);

        menuEmpleadoDeVentas.setVisible(false);
        menuEmpleadoDeVentas.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        gestionVenta.setText("Nueva Venta");
        gestionVenta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionVentaActionPerformed(evt);
            }
        });

        gestionClientes1.setText("Clientes");
        gestionClientes1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionClientes1ActionPerformed(evt);
            }
        });

        gestionDevoluciones1.setText("Devoluciones");
        gestionDevoluciones1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionDevoluciones1ActionPerformed(evt);
            }
        });

        listados1.setText("Listados");
        listados1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                listados1ActionPerformed(evt);
            }
        });

        cambiarDeUsuario1.setText("Cambiar de usuario");
        cambiarDeUsuario1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cambiarDeUsuario1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout menuEmpleadoDeVentasLayout = new javax.swing.GroupLayout(menuEmpleadoDeVentas);
        menuEmpleadoDeVentas.setLayout(menuEmpleadoDeVentasLayout);
        menuEmpleadoDeVentasLayout.setHorizontalGroup(
            menuEmpleadoDeVentasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(menuEmpleadoDeVentasLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(menuEmpleadoDeVentasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(menuEmpleadoDeVentasLayout.createSequentialGroup()
                        .addGroup(menuEmpleadoDeVentasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(cambiarDeUsuario1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                            .addComponent(listados1, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                            .addComponent(gestionDevoluciones1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
                        .addGap(14, 14, 14))
                    .addGroup(menuEmpleadoDeVentasLayout.createSequentialGroup()
                        .addGroup(menuEmpleadoDeVentasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(gestionVenta, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(gestionClientes1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE))
                        .addContainerGap(14, Short.MAX_VALUE))))
        );
        menuEmpleadoDeVentasLayout.setVerticalGroup(
            menuEmpleadoDeVentasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(menuEmpleadoDeVentasLayout.createSequentialGroup()
                .addGap(43, 43, 43)
                .addComponent(gestionVenta)
                .addGap(18, 18, 18)
                .addComponent(gestionClientes1)
                .addGap(18, 18, 18)
                .addComponent(gestionDevoluciones1)
                .addGap(18, 18, 18)
                .addComponent(listados1)
                .addGap(18, 18, 18)
                .addComponent(cambiarDeUsuario1)
                .addContainerGap(194, Short.MAX_VALUE))
        );

        menuEmpleadoDeVentas.setBounds(30, 140, 180, 430);
        jLayeredPane1.add(menuEmpleadoDeVentas, javax.swing.JLayeredPane.DEFAULT_LAYER);

        menuGerente.setVisible(false);
        menuGerente.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        gestionProductos.setText("Productos");
        gestionProductos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionProductosActionPerformed(evt);
            }
        });

        gestionPedidos.setText("Pedidos");
        gestionPedidos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionPedidosActionPerformed(evt);
            }
        });

        gestionStock.setText("Stock Materia Prima");
        gestionStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionStockActionPerformed(evt);
            }
        });

        gestionClientes.setText("Clientes");
        gestionClientes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionClientesActionPerformed(evt);
            }
        });

        gestionDevoluciones.setText("Devoluciones");
        gestionDevoluciones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionDevolucionesActionPerformed(evt);
            }
        });

        gestionCtaCte.setText("Cuenta Corriente");
        gestionCtaCte.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionCtaCteActionPerformed(evt);
            }
        });

        listados.setText("Listados");
        listados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                listadosActionPerformed(evt);
            }
        });

        gestionUsuario.setText("Cambiar de usuario");
        gestionUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionUsuarioActionPerformed(evt);
            }
        });

        gestionEmpleados.setText("Empleados");
        gestionEmpleados.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionEmpleadosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout menuGerenteLayout = new javax.swing.GroupLayout(menuGerente);
        menuGerente.setLayout(menuGerenteLayout);
        menuGerenteLayout.setHorizontalGroup(
            menuGerenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(menuGerenteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(menuGerenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(gestionProductos, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionClientes, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionPedidos, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionDevoluciones, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionStock, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionCtaCte, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionEmpleados, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(listados, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
                .addContainerGap())
        );
        menuGerenteLayout.setVerticalGroup(
            menuGerenteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(menuGerenteLayout.createSequentialGroup()
                .addGap(34, 34, 34)
                .addComponent(gestionProductos)
                .addGap(18, 18, 18)
                .addComponent(gestionClientes)
                .addGap(18, 18, 18)
                .addComponent(gestionPedidos)
                .addGap(18, 18, 18)
                .addComponent(gestionDevoluciones)
                .addGap(18, 18, 18)
                .addComponent(gestionStock)
                .addGap(18, 18, 18)
                .addComponent(gestionCtaCte)
                .addGap(18, 18, 18)
                .addComponent(gestionEmpleados)
                .addGap(18, 18, 18)
                .addComponent(listados)
                .addGap(18, 18, 18)
                .addComponent(gestionUsuario)
                .addContainerGap(39, Short.MAX_VALUE))
        );

        menuGerente.setBounds(30, 140, 180, 430);
        jLayeredPane1.add(menuGerente, javax.swing.JLayeredPane.DEFAULT_LAYER);

        menuAdministrador.setVisible(false);
        menuAdministrador.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        cambiarDeUsuario.setText("Cambiar de usuario");
        cambiarDeUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cambiarDeUsuarioActionPerformed(evt);
            }
        });

        gestionClientes2.setText("Clientes");
        gestionClientes2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionClientes2ActionPerformed(evt);
            }
        });

        gestionPedidos1.setText("Pedidos");
        gestionPedidos1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionPedidos1ActionPerformed(evt);
            }
        });

        gestionProductos1.setText("Productos");
        gestionProductos1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionProductos1ActionPerformed(evt);
            }
        });

        gestionDevoluciones2.setText("Devoluciones");
        gestionDevoluciones2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                gestionDevoluciones2ActionPerformed(evt);
            }
        });

        listados2.setText("Listados");
        listados2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                listados2ActionPerformed(evt);
            }
        });

        jButton1.setText("Personalizar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton5.setText("Crear cuenta");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout menuAdministradorLayout = new javax.swing.GroupLayout(menuAdministrador);
        menuAdministrador.setLayout(menuAdministradorLayout);
        menuAdministradorLayout.setHorizontalGroup(
            menuAdministradorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(menuAdministradorLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(menuAdministradorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(listados2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionDevoluciones2, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionClientes2, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionPedidos1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(gestionProductos1, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(jButton5, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(cambiarDeUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE))
                .addContainerGap())
        );
        menuAdministradorLayout.setVerticalGroup(
            menuAdministradorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(menuAdministradorLayout.createSequentialGroup()
                .addGap(36, 36, 36)
                .addComponent(gestionProductos1)
                .addGap(18, 18, 18)
                .addComponent(gestionClientes2)
                .addGap(18, 18, 18)
                .addComponent(gestionPedidos1)
                .addGap(18, 18, 18)
                .addComponent(gestionDevoluciones2)
                .addGap(18, 18, 18)
                .addComponent(listados2)
                .addGap(18, 18, 18)
                .addComponent(jButton5)
                .addGap(18, 18, 18)
                .addComponent(jButton1)
                .addGap(18, 18, 18)
                .addComponent(cambiarDeUsuario)
                .addContainerGap(78, Short.MAX_VALUE))
        );

        menuAdministrador.setBounds(30, 140, 180, 430);
        jLayeredPane1.add(menuAdministrador, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelStock.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        panelStock.setVisible(false);

        jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/en_construccion.jpg"))); // NOI18N

        javax.swing.GroupLayout panelStockLayout = new javax.swing.GroupLayout(panelStock);
        panelStock.setLayout(panelStockLayout);
        panelStockLayout.setHorizontalGroup(
            panelStockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, 744, Short.MAX_VALUE)
        );
        panelStockLayout.setVerticalGroup(
            panelStockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, 504, Short.MAX_VALUE)
        );

        panelStock.setBounds(260, 140, 750, 510);
        jLayeredPane1.add(panelStock, javax.swing.JLayeredPane.DEFAULT_LAYER);

        panelLogin.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));

        registroDeUsuario.setFont(new java.awt.Font("Tahoma", 1, 14));
        registroDeUsuario.setForeground(new java.awt.Color(0, 0, 102));
        registroDeUsuario.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        registroDeUsuario.setText("Registro de usuario Panadería La Baguette");

        usuario.setFont(new java.awt.Font("Tahoma", 1, 12));
        usuario.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        usuario.setText("Usuario");

        contraseña.setFont(new java.awt.Font("Tahoma", 1, 12));
        contraseña.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        contraseña.setText("Contraseña");

        ingresar.setText("Ingresar");
        ingresar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ingresarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelLoginLayout = new javax.swing.GroupLayout(panelLogin);
        panelLogin.setLayout(panelLoginLayout);
        panelLoginLayout.setHorizontalGroup(
            panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelLoginLayout.createSequentialGroup()
                .addGap(48, 48, 48)
                .addGroup(panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelLoginLayout.createSequentialGroup()
                        .addGroup(panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(usuario, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)
                            .addComponent(contraseña, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(passwordUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(nombreusuario, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(ingresar, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE))
                    .addComponent(registroDeUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 390, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(53, 53, 53))
        );
        panelLoginLayout.setVerticalGroup(
            panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelLoginLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(registroDeUsuario)
                .addGap(24, 24, 24)
                .addGroup(panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(usuario, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nombreusuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(panelLoginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(contraseña, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(passwordUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(ingresar))
                .addContainerGap(37, Short.MAX_VALUE))
        );

        panelLogin.setBounds(270, 140, 500, 140);
        jLayeredPane1.add(panelLogin, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo.PNG"))); // NOI18N
        jLabel1.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        jLabel1.setBounds(0, 0, 1020, 780);
        jLayeredPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jMenu1.setText("Archivo");
        jMenu1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu1ActionPerformed(evt);
            }
        });

        jMenuItem14.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/venta.png"))); // NOI18N
        jMenuItem14.setText("Ventas");
        jMenuItem14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem14ActionPerformed(evt);
            }
        });
        jMenuItem14.setVisible(false);
        jMenu1.add(jMenuItem14);

        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/producto2.PNG"))); // NOI18N
        jMenuItem2.setText("Productos");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenuItem2.setVisible(false);
        jMenu1.add(jMenuItem2);

        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/Msn( B & G ).png"))); // NOI18N
        jMenuItem3.setText("Clientes");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenuItem3.setVisible(false);
        jMenu1.add(jMenuItem3);

        jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/pedido2.PNG"))); // NOI18N
        jMenuItem4.setText("Pedidos");
        jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem4ActionPerformed(evt);
            }
        });
        jMenuItem4.setVisible(false);
        jMenu1.add(jMenuItem4);

        jMenuItem5.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/devoluciones2.png"))); // NOI18N
        jMenuItem5.setText("Devoluciones");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenuItem5.setVisible(false);
        jMenu1.add(jMenuItem5);

        jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_K, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/stock2.png"))); // NOI18N
        jMenuItem6.setText("Stock");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenuItem6.setVisible(false);
        jMenu1.add(jMenuItem6);

        jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_R, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cuenta corriente2.png"))); // NOI18N
        jMenuItem7.setText("Cuenta Corriente");
        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem7ActionPerformed(evt);
            }
        });
        jMenuItem7.setVisible(false);
        jMenu1.add(jMenuItem7);

        jMenuItem10.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/listados2.png"))); // NOI18N
        jMenuItem10.setText("Listados");
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        this.jMenuItem10.setVisible(false);
        jMenu1.add(jMenuItem10);

        jMenuItem12.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/empleados2.png"))); // NOI18N
        jMenuItem12.setText("Empleados");
        jMenuItem12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem12ActionPerformed(evt);
            }
        });
        jMenuItem12.setVisible(false);
        jMenu1.add(jMenuItem12);

        jMenuItem11.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cambiar de usuario2.png"))); // NOI18N
        jMenuItem11.setText("Cambiar de usuario");
        jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem11ActionPerformed(evt);
            }
        });
        this.jMenuItem11.setVisible(false);
        jMenu1.add(jMenuItem11);

        jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/crear cuenta2.png"))); // NOI18N
        jMenuItem9.setText("Crear cuenta");
        jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem9ActionPerformed(evt);
            }
        });
        jMenuItem9.setVisible(false);
        jMenu1.add(jMenuItem9);

        jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/salir2.png"))); // NOI18N
        jMenuItem8.setText("Salir");
        jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem8ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem8);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Ayuda");

        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_M, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/manual.png"))); // NOI18N
        jMenuItem1.setText("Manual del usuario");
        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem1ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem1);
        jMenu2.add(jSeparator1);

        jMenuItem13.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItem13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/acerca.png"))); // NOI18N
        jMenuItem13.setText("Acerca de...");
        jMenuItem13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem13ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem13);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1021, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 688, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_salirActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  System.exit(0);
            }
        }
        else
        {
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                System.exit(0);
        }
            
}//GEN-LAST:event_salirActionPerformed
    private void listadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_listadosActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionListados();
            }
        }
        else
            this.panaderia.crearMenuGestionListados();
}//GEN-LAST:event_listadosActionPerformed

    private void gestionStockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionStockActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionStock();
            }
        }
        else
            this.panaderia.crearMenuGestionStock();
    }//GEN-LAST:event_gestionStockActionPerformed

    private void gestionClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionClientesActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionClientes();                
            }
        }
        else
            this.panaderia.crearMenuGestionClientes();
        
    }//GEN-LAST:event_gestionClientesActionPerformed

    private void gestionDevolucionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionDevolucionesActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionDevoluciones();
            }
        }
        else
            this.panaderia.crearMenuGestionDevoluciones();
    }//GEN-LAST:event_gestionDevolucionesActionPerformed

    private void gestionProductosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionProductosActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionProductos();
            }
        }
        else
            this.panaderia.crearMenuGestionProductos();
    }//GEN-LAST:event_gestionProductosActionPerformed

    private void gestionVentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionVentaActionPerformed
        this.panaderia.crearMenuNuevaVenta();
    }//GEN-LAST:event_gestionVentaActionPerformed

    private void gestionCtaCteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionCtaCteActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionCtaCte();
            }
        }
        else
            this.panaderia.crearMenuGestionCtaCte();
    }//GEN-LAST:event_gestionCtaCteActionPerformed

    private void gestionPedidosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionPedidosActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionPedidos();
            }
        }
        else
            this.panaderia.crearMenuGestionPedidos();
    }//GEN-LAST:event_gestionPedidosActionPerformed

    private void botonAgregarPedidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAgregarPedidoActionPerformed
        this.jLabel18.setText("Pedidos->Agregar Pedido");
        this.jPanel13.setVisible(false);
        //this.jPanel11.setVisible(true);
        this.jPanel41.setVisible(true);
    }//GEN-LAST:event_botonAgregarPedidoActionPerformed

    private void botonCanjeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonCanjeActionPerformed
        this.limpiarPanelDevolucion();
        this.jLabel16.setText(" Devoluciones->Canje");
        this.jPanel32.setVisible(true);
    }//GEN-LAST:event_botonCanjeActionPerformed

    private void ingresarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ingresarActionPerformed

        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.loginEmpleado(nombreusuario.getText().trim(), passwordUsuario.getText().trim());
            }
        }
        else
            this.panaderia.loginEmpleado(nombreusuario.getText().trim(), passwordUsuario.getText().trim());
    }//GEN-LAST:event_ingresarActionPerformed

    private void botonDevolucionPedidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonDevolucionPedidoActionPerformed
        this.limpiarPanelDevolucion();
        this.jLabel16.setText(" Devoluciones->Devolución de pedido");
        this.jPanel33.setVisible(true);
    }//GEN-LAST:event_botonDevolucionPedidoActionPerformed

    private void gestionUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionUsuarioActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.mostrarLogIn();
            }
        }
        else
            this.panaderia.mostrarLogIn();
    }//GEN-LAST:event_gestionUsuarioActionPerformed

    private void gestionClientes1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionClientes1ActionPerformed

        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionClientes();
            }
        }
        else
        {
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.crearMenuGestionClientes();
        }
    }//GEN-LAST:event_gestionClientes1ActionPerformed

    private void gestionDevoluciones1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionDevoluciones1ActionPerformed

        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionDevoluciones();
            }
        }
        else
        {
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.crearMenuGestionDevoluciones();
        }
    }//GEN-LAST:event_gestionDevoluciones1ActionPerformed

    private void listados1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_listados1ActionPerformed

        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionListados();
            }
        }
        else
        {
            
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.crearMenuGestionListados();
        }
    }//GEN-LAST:event_listados1ActionPerformed

    private void cambiarDeUsuario1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cambiarDeUsuario1ActionPerformed

        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.mostrarLogIn();
            }
        }
        else
        {

            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.mostrarLogIn();
        }

    }//GEN-LAST:event_cambiarDeUsuario1ActionPerformed

    private void gestionClientes2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionClientes2ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionClientes();
            }
        }
        else
            this.panaderia.crearMenuGestionClientes();
    }//GEN-LAST:event_gestionClientes2ActionPerformed

    private void gestionPedidos1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionPedidos1ActionPerformed
        this.panaderia.crearMenuGestionPedidos();
    }//GEN-LAST:event_gestionPedidos1ActionPerformed

    private void gestionProductos1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionProductos1ActionPerformed
        this.panaderia.crearMenuGestionProductos();
    }//GEN-LAST:event_gestionProductos1ActionPerformed

    private void gestionDevoluciones2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionDevoluciones2ActionPerformed
        this.panaderia.crearMenuGestionDevoluciones();
    }//GEN-LAST:event_gestionDevoluciones2ActionPerformed

    private void listados2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_listados2ActionPerformed
        this.panaderia.crearMenuGestionListados();
    }//GEN-LAST:event_listados2ActionPerformed

    private void cambiarDeUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cambiarDeUsuarioActionPerformed
        this.panaderia.mostrarLogIn();
    }//GEN-LAST:event_cambiarDeUsuarioActionPerformed

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionProductos();
            }
        }
        else
            this.panaderia.crearMenuGestionProductos();
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionClientes();
            }
        }
        else
        {
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.crearMenuGestionClientes();
        }
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jMenuItem4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem4ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionPedidos();
            }
        }
        else
                  this.panaderia.crearMenuGestionPedidos();
    }//GEN-LAST:event_jMenuItem4ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed

        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionDevoluciones();
            }
        }
        else
        {
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.crearMenuGestionDevoluciones();
        }
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionStock();
            }
        }
        else
                  this.panaderia.crearMenuGestionStock();
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem7ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionCtaCte();
            }
        }
        else
                  this.panaderia.crearMenuGestionCtaCte();
    }//GEN-LAST:event_jMenuItem7ActionPerformed

    private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  System.exit(0);
            }
        }
        else
        {
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                System.exit(0);
        }
    }//GEN-LAST:event_jMenuItem8ActionPerformed

    private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem9ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuNuevoUsuario();
            }
        }
        else
            this.panaderia.crearMenuNuevoUsuario();
    }//GEN-LAST:event_jMenuItem9ActionPerformed

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionListados();
            }
        }
        else
        {

            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.crearMenuGestionListados();
        }
    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem11ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.mostrarLogIn();
            }
        }
        else
        {

            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                this.panaderia.mostrarLogIn();
        }
    }//GEN-LAST:event_jMenuItem11ActionPerformed

    private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem12ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuGestionEmpleados();
            }
        }
        else
                  this.panaderia.crearMenuGestionEmpleados();
    }//GEN-LAST:event_jMenuItem12ActionPerformed



    private void botonListarProductosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonListarProductosActionPerformed
        this.mostrarProductos();
    }//GEN-LAST:event_botonListarProductosActionPerformed

    private void botonListarClientesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonListarClientesActionPerformed
        this.limpiarPanelListado();
        this.jPanel18.setVisible(true);
        this.jLabel14.setText("Listados->Listar Clientes");
        this.mostrarClientesMinoristas();
        this.mostrarClientesMayoristas();
    }//GEN-LAST:event_botonListarClientesActionPerformed

    private void botonListarVentasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonListarVentasActionPerformed
        this.limpiarPanelListado();
        this.jLabel14.setText("Listados->Listar Ventas/período");
        this.jPanel38.setVisible(true);

    }//GEN-LAST:event_botonListarVentasActionPerformed

    private void botonListarPedidosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonListarPedidosActionPerformed
        this.limpiarPanelListado();
        this.jPanel7.setVisible(true);
        this.jLabel14.setText("Listados->Listar Pedidos");
    }//GEN-LAST:event_botonListarPedidosActionPerformed

    private void botonDevolucionDineroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonDevolucionDineroActionPerformed
        this.limpiarPanelDevolucion();
        this.jLabel16.setText(" Devoluciones->Devolución de dinero");
        this.jPanel31.setVisible(true);
    }//GEN-LAST:event_botonDevolucionDineroActionPerformed

    private void botonModificarPedidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonModificarPedidoActionPerformed
        this.jLabel18.setText("Pedidos->Modificar Pedido");
    }//GEN-LAST:event_botonModificarPedidoActionPerformed

    private void botonEliminarPedidoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonEliminarPedidoActionPerformed
        this.jLabel18.setText("Pedidos->Eliminar Pedido");
    }//GEN-LAST:event_botonEliminarPedidoActionPerformed

    private void gestionEmpleadosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_gestionEmpleadosActionPerformed
        this.dibujarMenuGestionEmpleados();
    }//GEN-LAST:event_gestionEmpleadosActionPerformed

    private void botonAgregarProductoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAgregarProductoActionPerformed
        this.limpiarPanelProducto();
        this.jLabel2.setText(" Productos->Agregar Producto");
        this.jPanel3.setVisible(true);
    }//GEN-LAST:event_botonAgregarProductoActionPerformed

    private void botonModificarProductoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonModificarProductoActionPerformed
        this.limpiarPanelProducto();
        this.jLabel2.setText(" Productos->Modificar Producto");
        this.jPanel16.setVisible(true);
    }//GEN-LAST:event_botonModificarProductoActionPerformed

    private void botonEliminarProductoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonEliminarProductoActionPerformed
        this.limpiarPanelProducto();
        this.jLabel2.setText(" Productos->Eliminar Producto");
        this.jPanel17.setVisible(true);
    }//GEN-LAST:event_botonEliminarProductoActionPerformed

    private void botonAgregarProdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAgregarProdActionPerformed
        try{
            this.panaderia.validarProducto(this.campoCodigo.getText().trim(),this.campoNombre.getText().trim(),this.campoPrecioUnitario.getText().trim(),this.campoStock.getText().trim());
            this.panaderia.crearProducto(this.campoCodigo.getText().trim(),this.campoNombre.getText().trim(), this.campoDescripcion.getText().trim(), this.campoPrecioUnitario.getText().trim(), this.comboUnidad.getSelectedItem().toString(),this.campoStock.getText().trim());
        }
        catch (Exception e)
        {
            if (e instanceof ProductoExcepcion)
                JOptionPane.showMessageDialog(null,e.getMessage()+"\nVerifique los datos ingresados","ERROR",2);
            if (e instanceof CodigoProductoExcepcion)
                this.campoCodigo.setForeground(Color.red);
            
            if (e instanceof NombreProductoExcepcion)
                this.campoNombre.setForeground(Color.red);
            
            if (e instanceof PrecioProductoExcepcion)
                this.campoPrecioUnitario.setForeground(Color.red);
            
            if (e instanceof StockExcepcion)
                this.campoStock.setForeground(Color.red);
        }
    }//GEN-LAST:event_botonAgregarProdActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        this.panaderia.setHayOperacionEnCurso(true);
        this.botonModificar.setEnabled(true);
        this.campoDetalleProductoAModificar.setEnabled(true);
        this.mostrarProducto();
        this.campoDetalleProductoAModificar.setEnabled(true);
    }//GEN-LAST:event_jButton7ActionPerformed

    private void botonElimniarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonElimniarActionPerformed
        this.panaderia.eliminarProducto(this.campoCodigoProducto.getText().trim());
        this.campoCodigoProducto.setText("");
    }//GEN-LAST:event_botonElimniarActionPerformed

    private void botonModificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonModificarActionPerformed
       if (this.campoDetalleProductoAModificar.getSelectedColumn() != 3 && this.campoDetalleProductoAModificar.getSelectedColumn() != -1)
            this.campoDetalleProductoAModificar.getCellEditor().stopCellEditing();

       try{
            this.panaderia.validarProducto(this.jTextField5.getText().trim(),this.campoDetalleProductoAModificar.getValueAt(0,0).toString(),this.campoDetalleProductoAModificar.getValueAt(0,2).toString(),this.campoDetalleProductoAModificar.getValueAt(0,4).toString());
            this.panaderia.modificarProducto(this.jTextField5.getText().trim(),this.campoDetalleProductoAModificar.getValueAt(0,0).toString(),this.campoDetalleProductoAModificar.getValueAt(0,1).toString(),this.campoDetalleProductoAModificar.getValueAt(0,2).toString(),this.jComboBox3.getSelectedItem().toString(),this.campoDetalleProductoAModificar.getValueAt(0,4).toString());
            this.limpiarPanelModificarProducto();
            this.panaderia.setHayOperacionEnCurso(false);
       }
       catch (Exception e)
       {
            if (e instanceof ProductoExcepcion)
                JOptionPane.showMessageDialog(null,e.getMessage()+"\nVerifique los datos ingresados","ERROR",2);
            
            if (e instanceof NombreProductoExcepcion)
                this.campoDetalleProductoAModificar.setValueAt("",0,0);
            
            if (e instanceof PrecioProductoExcepcion)
                this.campoDetalleProductoAModificar.setValueAt("",0,2);
            
            if (e instanceof StockExcepcion)
                this.campoDetalleProductoAModificar.setValueAt("",0,4);
        }
       
    }//GEN-LAST:event_botonModificarActionPerformed

    private void limpiarPanelModificarProducto()
    {
        this.jTextField5.setText("");
        this.campoDetalleProductoAModificar.setModel( this.borrarTabla( (DefaultTableModel) this.campoDetalleProductoAModificar.getModel()) );
        this.campoDetalleProductoAModificar.setEnabled(false);

    }

    private void botonImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonImprimirActionPerformed
        try {
            boolean imprime = this.tablaListadoProductos.print();
            if (!imprime)
            {
                JOptionPane.showMessageDialog(null,"La impresión fue cancelada","Atención!",1);
            }
        } catch (PrinterException ex) {
            JOptionPane.showMessageDialog(null,"Hubo un error al intentar imprimir...\nVerifique su impresora"+ex.getMessage(),"ERROR",2);
        }
    }//GEN-LAST:event_botonImprimirActionPerformed

    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed

        File archivo = new File("C:\\Manual del usuario.pdf");
        if (Desktop.isDesktopSupported() == true)
        {
            Desktop desktop = Desktop.getDesktop();
            if (archivo.exists() == true)
            {
                try {
                    desktop.open(archivo);
                } catch (IOException ex) {
                    JOptionPane.showMessageDialog(this,"No pudo abrirse el Manual del usuario"+ex.getMessage(),"ERROR",2);
                }
            }
            else
            {
                JOptionPane.showMessageDialog(this,"No se encontro el Manual del usuario","ERROR",2);
            }
        }

    }//GEN-LAST:event_jMenuItem1ActionPerformed

    private void jMenuItem13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem13ActionPerformed
       new Acerca().setVisible(true);
    }//GEN-LAST:event_jMenuItem13ActionPerformed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  System.exit(0);
            }
            
        }
        else
        {
            if (Panaderia.isHayVentaEnCurso())
                JOptionPane.showMessageDialog(null, "La venta no ha sido registrada\nPulse el boton Registrar para registrar la venta", "Advertencia", 2);
            else
                System.exit(0);
        }
            
    }//GEN-LAST:event_formWindowClosing

    private void jMenu1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu1ActionPerformed
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuNuevoUsuario();
            }
        }
        else
            this.panaderia.crearMenuNuevoUsuario();       
    }//GEN-LAST:event_jMenu1ActionPerformed

    private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
        // TODO add your handling code here:
        this.limpiarPanelCliente();
        this.jLabel12.setText(" Clientes->Agregar Cliente");
        this.jPanel21.setVisible(true);
    }//GEN-LAST:event_jButton15ActionPerformed

    private void jLabel25MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel25MouseClicked
        // TODO add your handling code here:
        this.limpiarPanelCliente();
        this.jPanel22.setVisible(true);
    }//GEN-LAST:event_jLabel25MouseClicked

    private void jLabel26MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel26MouseClicked
        // TODO add your handling code here:
        this.limpiarPanelCliente();
        this.jPanel23.setVisible(true);
    }//GEN-LAST:event_jLabel26MouseClicked

    private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
        // TODO add your handling code here:
        this.limpiarPanelCliente();
        this.jLabel12.setText(" Clientes->Agregar Cliente");
        this.jPanel21.setVisible(true);
    }//GEN-LAST:event_jButton19ActionPerformed

    private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed
        // TODO add your handling code here:
        this.limpiarPanelCliente();
        this.jLabel12.setText(" Clientes->Agregar Cliente");
        this.jPanel21.setVisible(true);
    }//GEN-LAST:event_jButton21ActionPerformed

    private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed
       // TODO add your handling code here:
       this.panaderia.crearClienteMayorista(this);
       
    }//GEN-LAST:event_jButton18ActionPerformed

    private void botonAgregarClienteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAgregarClienteActionPerformed
      
        this.panaderia.crearClienteMinorista(this);
        this.campoNYA.setText("");
        this.campoDNI.setText("");
        this.campoCalle.setText("");
        this.campoNro.setText("");
        this.campoDepto.setText("");
        this.campoPiso.setText("");
        this.campoTelefono.setText("");

    }//GEN-LAST:event_botonAgregarClienteActionPerformed

    private void botonVolverMenuListadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonVolverMenuListadoActionPerformed
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(false);
        this.panaderia.crearMenuGestionListados();
    }//GEN-LAST:event_botonVolverMenuListadoActionPerformed

    private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(false);
        this.panaderia.crearMenuGestionClientes();
    }//GEN-LAST:event_jButton23ActionPerformed

    private void btnVolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVolverActionPerformed
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(false);
        this.panaderia.crearMenuGestionProductos();
    }//GEN-LAST:event_btnVolverActionPerformed

    private void botonVolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonVolverActionPerformed
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(false);
        this.panaderia.crearMenuGestionProductos();
    }//GEN-LAST:event_botonVolverActionPerformed

    private void buttonVolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonVolverActionPerformed
        // TODO add your handling code here:
        if( this.panaderia.isHayOperacionEnCurso() )
        {
            int opcion;
           opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.setHayOperacionEnCurso(false);
                  this.limpiarPanelModificarProducto();
                  this.panaderia.crearMenuGestionProductos();
            }
        }
        else
        {
            this.jTextField5.setText("");
            this.panaderia.crearMenuGestionProductos();
        }

       
    }//GEN-LAST:event_buttonVolverActionPerformed



    private void botonAgregarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAgregarActionPerformed
        // TODO add your handling code here:
        try{
            this.agregarProducto();
            if (this.jScrollPane6.getVerticalScrollBar().isShowing())
            {
                Rectangle r = this.tablaDetalleProducto.getCellRect( this.tablaDetalleProducto.getRowCount(),1, false);
                jScrollPane6.getViewport().scrollRectToVisible(r);
                
            }
            
        }
        catch (Exception e){
            if ( e instanceof VentaExcepcion )
            {
                JOptionPane.showMessageDialog(this,e.getMessage(),"ERROR", 2);
            }
            
        }

    }//GEN-LAST:event_botonAgregarActionPerformed

    private void botonEfectivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonEfectivoActionPerformed
        try {
            // TODO add your handling code here:
            this.panaderia.registrarVenta(this);
            this.campoProducto.setText("");
            this.jLabel54.setText("");
            this.borrarTabla((DefaultTableModel) this.tablaProducto.getModel());
       } catch (Exception e) {
            if (e instanceof EfectivoVacioExcepcion)
            {
                JOptionPane.showMessageDialog(this, e.getMessage(),"ERROR", 2);
            }
            if (e instanceof EfectivoIncorrectoExcepcion)
            {
                JOptionPane.showMessageDialog(this, e.getMessage(),"ERROR", 2);
            }
            if (e instanceof EfectivoInsuficienteExcepcion)
            {
                JOptionPane.showMessageDialog(this, e.getMessage(),"ERROR", 2);
            }
            
        }

    }//GEN-LAST:event_botonEfectivoActionPerformed

    private void botonQuitarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonQuitarActionPerformed
        // TODO add your handling code here:
        int fila;

        if( this.tablaDetalleProducto.getRowCount() == 0 )
            return;

        if( this.tablaDetalleProducto.getSelectedRow() == -1 )
            fila = this.tablaDetalleProducto.getRowCount()-1;
        else
            fila = this.tablaDetalleProducto.getSelectedRow();

        DefaultTableModel datos = (DefaultTableModel) this.tablaDetalleProducto.getModel();
        datos.removeRow(fila);
        this.tablaDetalleProducto.setModel(datos);

        this.calcularTotal(this.tablaDetalleProducto,this.jLabel46);

        if( this.tablaDetalleProducto.getRowCount() == 0 )
        {
            Panaderia.setHayOperacionEnCurso(false);
            this.botonImprimirComp.setEnabled(false);
            this.botonEfectivo.setEnabled(false);
            this.botonQuitar.setEnabled(false);
            this.botonVaciarDetalle.setEnabled(false);
        }

        
        this.etiquetaEfectivo.setText("$ 0.00");
        this.etiquetaCambio.setText("$ 0.00");
        this.campoEfectivo.setText("");
    }//GEN-LAST:event_botonQuitarActionPerformed

    private void botonVaciarDetalleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonVaciarDetalleActionPerformed
        // TODO add your handling code here:
        int opcion = JOptionPane.showConfirmDialog(this, "Está a punto de eliminar todos los productos de la venta actual.\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
        if (opcion == 0)
        {
            this.limpiarVenta();
            this.etiquetaEfectivo.setText("$ 0.00");
            this.etiquetaCambio.setText("$ 0.00");
            this.campoEfectivo.setText("");
            this.botonImprimirComp.setEnabled(false);
            this.botonEfectivo.setEnabled(false);
        }
    }//GEN-LAST:event_botonVaciarDetalleActionPerformed

    private void jMenuItem14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem14ActionPerformed
        // TODO add your handling code here:
        this.panaderia.crearMenuNuevaVenta();
    }//GEN-LAST:event_jMenuItem14ActionPerformed

    private void tablaProductoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaProductoMouseClicked
        // TODO add your handling code here:
        this.jLabel54.setText( this.tablaProducto.getValueAt(this.tablaProducto.getSelectedRow(),4).toString() );
    }//GEN-LAST:event_tablaProductoMouseClicked

    private void formMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMousePressed
        // TODO add your handling code here:
        this.mostrarMenuContextual(evt);
    }//GEN-LAST:event_formMousePressed

    private void formMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_formMouseReleased
        // TODO add your handling code here:
        this.mostrarMenuContextual(evt);
    }//GEN-LAST:event_formMouseReleased

    private void jMenuItem15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem15ActionPerformed
        // TODO add your handling code here:

        if (this.panelLogin.isVisible())
            JOptionPane.showMessageDialog(this,"En construccion: Desarrollar ayuda online -- Panel Login","Ayuda online",1);

        if (this.panelProducto.isVisible())
            JOptionPane.showMessageDialog(this,"En construccion: Desarrollar ayuda online -- Panel Producto","Ayuda online",1);

        if (this.panelListado.isVisible())
            JOptionPane.showMessageDialog(this,"En construccion: Desarrollar ayuda online -- Panel Listados","Ayuda online",1);

        if (this.panelCliente.isVisible())
            JOptionPane.showMessageDialog(this,"En construccion: Desarrollar ayuda online -- Panel Clientes","Ayuda online",1);

        if (this.panelVenta.isVisible())
            JOptionPane.showMessageDialog(this,"En construccion: Desarrollar ayuda online -- Panel Venta","Ayuda online",1);
        
    }//GEN-LAST:event_jMenuItem15ActionPerformed

    private void jTextField5KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField5KeyPressed
        // TODO add your handling code here:
        this.campoDetalleProductoAModificar.setEnabled(false);
        this.botonModificar.setEnabled(false);
        this.setKeys(this.jTextField5, "0123456789", null, true);
    }//GEN-LAST:event_jTextField5KeyPressed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuConfiguracion();
            }
        }
        else
            this.panaderia.crearMenuConfiguracion();
        
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        this.limpiarPantalla();
}//GEN-LAST:event_jButton2ActionPerformed

    private void campoProductoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoProductoKeyReleased
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(this);
        if (!this.campoProducto.getText().trim().isEmpty())
            this.mostrarProductosDonde(this.campoProducto.getText().trim(),this.tablaProducto);
        else
        {
            this.borrarTabla((DefaultTableModel) this.tablaProducto.getModel());
            if (tablaDetalleProducto.getRowCount() == 0)
                Panaderia.setHayOperacionEnCurso(false);
        }
        if (this.tablaProducto.getRowCount() != 0)
            this.jLabel54.setText( this.tablaProducto.getValueAt(0, 4).toString() );
    }//GEN-LAST:event_campoProductoKeyReleased

    private void botonImprimirCompActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonImprimirCompActionPerformed
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(false);
        new SplashImprimir("Ticket").setVisible(true);
        this.borrarTabla((DefaultTableModel) this.tablaProducto.getModel());
        this.botonImprimirComp.setEnabled(false);
        this.botonEfectivo.setEnabled(false);
        this.botonRegistrar.setEnabled(true);
        this.botonAgregar.setEnabled(false);
        this.botonQuitar.setEnabled(false);
        this.botonVaciarDetalle.setEnabled(false);
        this.campoProducto.setEnabled(false);
        this.campoCantidad.setEnabled(false);
        this.campoEfectivo.setEnabled(false);
        Panaderia.setHayVentaEnCurso(true);
    }//GEN-LAST:event_botonImprimirCompActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // TODO add your handling code here:
        if (Panaderia.isHayOperacionEnCurso())
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  this.panaderia.crearMenuNuevoUsuario();
            }
        }
        else
            this.panaderia.crearMenuNuevoUsuario();

    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // TODO add your handling code here:
        this.numero.setText("");
        this.fecha.setText("");
        this.hora.setText("");
        this.mostrarTicketVenta(this.jTextField2.getText().trim(),this.jTable1,this.numero,this.fecha,this.hora);
        this.jTextField2.setText("");
    }//GEN-LAST:event_jButton4ActionPerformed

    private void botonRegistrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonRegistrarActionPerformed
        // TODO add your handling code here:
        this.panaderia.registrarV(this);
        Panaderia.setHayVentaEnCurso(false);
    }//GEN-LAST:event_botonRegistrarActionPerformed

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
        // TODO add your handling code here:
        if (jRadioButton1.isSelected())
        {
            jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo.PNG")));
        }
        else
        {
            if (jRadioButton2.isSelected())
            {
                jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/fondo2.jpg")));
            }
        }
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        // TODO add your handling code here:
        if (this.jRadioButton1.isSelected())
            this.jRadioButton2.setSelected(false);
        else
            this.jRadioButton1.setSelected(true);
    }//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
        // TODO add your handling code here:
        if (this.jRadioButton2.isSelected())
            this.jRadioButton1.setSelected(false);
         else
            this.jRadioButton2.setSelected(true);
    }//GEN-LAST:event_jRadioButton2ActionPerformed

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
        // TODO add your handling code here:
        SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
        java.util.Date fechaAux, fechaAux2;
        
        fechaAux = this.jDateChooser1.getDate();
        fechaAux2 = this.jDateChooser2.getDate();
        String cad = df.format(fechaAux);
        String cad2 = df.format(fechaAux2);

        java.sql.Date fecha1 = new java.sql.Date(this.jDateChooser1.getDate().getTime());
        java.sql.Date fecha2 = new java.sql.Date(this.jDateChooser2.getDate().getTime());
        this.fechaDesde.setText(cad);
        this.fechaHasta.setText(cad2);

        this.mostrarVolumenVentas(fecha1,fecha2);
    }//GEN-LAST:event_jButton12ActionPerformed

    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
        // TODO add your handling code here:
        this.panaderia.crearVentanaGuardarExcel(this.jTable2);
    }//GEN-LAST:event_jButton13ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        // TODO add your handling code here:
        this.panaderia.crearVentanaGrafico(this.jTable2);
    }//GEN-LAST:event_jButton10ActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
        // TODO add your handling code here:
        try {
            boolean imprime = this.jTable2.print();
            if (!imprime)
            {
                JOptionPane.showMessageDialog(null,"La impresión fue cancelada","Atención!",1);
            }
        } catch (PrinterException ex) {
            JOptionPane.showMessageDialog(null,"Hubo un error al intentar imprimir...\nVerifique su impresora"+ex.getMessage(),"ERROR",2);
        }
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jDateChooser1PropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jDateChooser1PropertyChange
        // TODO add your handling code here:
        if (jDateChooser1.getDate() != null)
        {
            jDateChooser2.setEnabled(true);
            jDateChooser2.setMinSelectableDate(jDateChooser1.getDate());
        }
        
    }//GEN-LAST:event_jDateChooser1PropertyChange

    private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
        // TODO add your handling code here:
        this.numero2.setText("");
        this.fecha2.setText("");
        this.hora2.setText("");
        this.mostrarTicketVenta(this.jTextField4.getText().trim(),this.jTable3,this.numero2,this.fecha2,this.hora2);
        
        this.jTextField4.setText("");
    }//GEN-LAST:event_jButton14ActionPerformed

    private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
        // TODO add your handling code here:
        if (this.cantidadADevolver.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(null,"Debe ingresar la cantidad de articulos a devolver","ERROR",2);
            return;
        }

        this.transferirProductos(this.jTable3,this.jTable4, 3,Integer.parseInt(this.cantidadADevolver.getText().trim()) );
        this.calcularTotal2(this.jTable4, this.jLabel75);//aca va la etiqueta total pedido
        this.cantidadADevolver.setText("");
        if (this.jTable3.getRowCount() == 0 )
        {
            this.jButton24.setEnabled(false);
            this.jButton22.setEnabled(true);
        }
        else
            this.jButton24.setEnabled(true);
    }//GEN-LAST:event_jButton16ActionPerformed


    
    /**
     *
     * @param tabla1
     * @param tabla2
     * @param columnaCantidad
     * @param cantidad
     */
    private void transferirProductos(JTable tabla1, JTable tabla2, int columnaCantidad,int cantidad)
    {
        int fila = tabla1.getSelectedRow();
        
        if (fila == -1)         //si no se seleccionó una fila
        {
            JOptionPane.showMessageDialog(null,"Debe seleccionar un producto","ERROR",2);
            return;
        }
       
        if( cantidad == 0 )
        {
            JOptionPane.showMessageDialog(null,"La cantidad a devolver no puede ser 0","ERROR",2);
            return;
        }


            int cantidad_anterior = Integer.parseInt(tabla1.getValueAt(fila, columnaCantidad).toString());
            int nueva_cantidad = cantidad_anterior - cantidad;

            if (nueva_cantidad < 0)    //verificamos que la cantidad seleccionada no supere la disponible
            {
                JOptionPane.showMessageDialog(null,"La cantidad debe ser menor o igual a la cantidad actual del producto","ERROR",2);
                return;
            }

            tabla1.setValueAt(nueva_cantidad,fila, columnaCantidad);

            DefaultTableModel datos4 = (DefaultTableModel) tabla2.getModel();
            Object [] producto = {
                  tabla1.getValueAt(fila, 0),
                  tabla1.getValueAt(fila, 1),
                  tabla1.getValueAt(fila, 2),
                  cantidad,
                  tabla1.getValueAt(fila, 4),
            };


            fila = buscarElementoEnTabla(tabla2,Integer.parseInt(tabla1.getValueAt(fila, 0).toString()), 0);

            if( fila != -1 )   //si el elemento ya se encuentra en la tabla de productos seleccionados para devolucion
            {
                  cantidad = Integer.parseInt( producto[columnaCantidad].toString() ) +  Integer.parseInt(tabla2.getValueAt(fila,columnaCantidad).toString());
                  datos4.setValueAt(cantidad, fila, columnaCantidad);
            }
            else
                  datos4.addRow(producto);

            if ( nueva_cantidad == 0 )  // no quedan más elementos para devolver
            {
                  fila = tabla1.getSelectedRow();
                  datos4 = (DefaultTableModel) tabla1.getModel();
                  datos4.removeRow(fila);
            }
    }




    /**
     *
     * @param tabla tabla en la que queremos verificar la pertenencia del elemento pasado como parametro
     * @param elemento el elemento que quermos buscar en la tabla
     * @param columna columna en la queremos verificar la pertencia del elemento
     * @return -1 si el elemento no pertenece a la lista caso contrario el número de la fila donde se encuentra
     */
    private int buscarElementoEnTabla(JTable tabla, int elemento, int columna )
    {
        for ( int i = 0 ; i < tabla.getRowCount() ; i ++  )
        {
            if (Integer.parseInt(tabla.getValueAt(i, columna).toString()) == elemento)
            {
                return i;
            }
        }

        return -1;
    }


    private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
        // TODO add your handling code here:if (this.jTextField7.getText().isEmpty())
        if (this.cantidadADevolver.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(null,"Debe ingresar la cantidad de articulos a devolver","ERROR",2);
            return;
        }
        this.transferirProductos(this.jTable4, this.jTable3, 3,Integer.parseInt(this.cantidadADevolver.getText().trim()) );
        this.calcularTotal2(this.jTable4, this.jLabel75);
        this.cantidadADevolver.setText("");

        if( this.jTable4.getRowCount() == 0 )
        {
            this.jButton24.setEnabled(false);
            this.jButton22.setEnabled(false);
        }
    }//GEN-LAST:event_jButton17ActionPerformed

    private void campoPrecioUnitarioKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoPrecioUnitarioKeyReleased
        // TODO add your handling code here:
        this.detectarDatoCarac(this.campoPrecioUnitario,"Formato de precio incorrecto. Debe ser así XXXXX.XX");
    }//GEN-LAST:event_campoPrecioUnitarioKeyReleased

    private void campoStockKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoStockKeyReleased
        // TODO add your handling code here:
        this.detectarDatoCarac(this.campoStock,"Formato fecha incorrecta. Debe ser así XXXXX.XX");
    }//GEN-LAST:event_campoStockKeyReleased

    private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed
        // TODO add your handling code here:
       this.panaderia.registrarDevolucionDinero(this);
       JOptionPane.showMessageDialog(this, "Se registro la devolución de dinero", "OK", 1);
       this.campoEfectivo.setText("");
       this.limpiarDevolucionDinero();
       this.botonRegistrar.setEnabled(false);
       this.botonAgregar.setEnabled(true);
       this.campoProducto.setEnabled(true);
       this.campoCantidad.setEnabled(true);
       this.campoEfectivo.setEnabled(true);
       Panaderia.setHayVentaEnCurso(false);

    }//GEN-LAST:event_jButton22ActionPerformed

    private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(false);
        new SplashImprimir("Ticket").setVisible(true);
        this.borrarTabla((DefaultTableModel) this.jTable3.getModel());
        this.borrarTabla((DefaultTableModel) this.jTable4.getModel());
        this.numero2.setEnabled(false);
        this.fecha2.setEnabled(false);
        this.hora2.setEnabled(false);
        this.botonImprimir.setEnabled(false);
        this.jButton14.setEnabled(false);
        this.jButton22.setEnabled(true);
        this.jButton24.setEnabled(false);
        Panaderia.setHayVentaEnCurso(true);
    }//GEN-LAST:event_jButton24ActionPerformed

    private void campoCodigoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoCodigoKeyPressed
        // TODO add your handling code here:
        this.setKeys(this.campoCodigo, "0123456789", null, true);
    }//GEN-LAST:event_campoCodigoKeyPressed

    private void campoCodigoProductoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoCodigoProductoKeyPressed
        // TODO add your handling code here:
        this.setKeys(this.campoCodigoProducto, "0123456789", null, true);
    }//GEN-LAST:event_campoCodigoProductoKeyPressed

    private void campoNroKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoNroKeyPressed
        // TODO add your handling code here:
        this.setKeys(this.campoNro, "0123456789", null, true);
    }//GEN-LAST:event_campoNroKeyPressed

    private void campoPisoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoPisoKeyPressed
        // TODO add your handling code here:
        this.setKeys(this.campoPiso, "0123456789", null, true);
    }//GEN-LAST:event_campoPisoKeyPressed

    private void campoDNIKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoDNIKeyPressed
        // TODO add your handling code here:
        this.setKeys(this.campoDNI, "0123456789", null, true);
    }//GEN-LAST:event_campoDNIKeyPressed

    private void campoNroClienteKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoNroClienteKeyPressed
        // TODO add your handling code here:
        this.setKeys(this.campoNroCliente, "0123456789", null, true);
    }//GEN-LAST:event_campoNroClienteKeyPressed

    private void campoPisoClienteKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoPisoClienteKeyPressed
        // TODO add your handling code here:
        this.setKeys(this.campoPisoCliente, "0123456789", null, true);
    }//GEN-LAST:event_campoPisoClienteKeyPressed

    private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButton27ActionPerformed

    private void jCheckBox4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox4ActionPerformed
        // TODO add your handling code here:
        if ( this.jDateChooser4.isEnabled() )
        {
            this.jLabel87.setEnabled(false);
            this.jDateChooser4.setEnabled(false);
        }
        else
        {
            this.jLabel87.setEnabled(true);
            this.jDateChooser4.setEnabled(true);
        }
    }//GEN-LAST:event_jCheckBox4ActionPerformed

    private void jDateChooser3PropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jDateChooser3PropertyChange
        // TODO add your handling code here:
        this.jDateChooser4.setMinSelectableDate(this.jDateChooser3.getDate());
       this.jDateChooser4.setEnabled(true);
    }//GEN-LAST:event_jDateChooser3PropertyChange

    private void jTextField8KeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField8KeyPressed
        // TODO add your handling code here:
         Panaderia.setHayOperacionEnCurso(this);
        if (!this.jTextField8.getText().trim().isEmpty())
            this.mostrarClientesDonde(this.jTextField8.getText().trim(),this.tablaCliente);
        else
        {
            this.borrarTabla((DefaultTableModel) this.tablaCliente.getModel());
        }

        
    }//GEN-LAST:event_jTextField8KeyPressed

    private void campoCodigoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_campoCodigoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_campoCodigoActionPerformed

    private void cantidadADevolverKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_cantidadADevolverKeyReleased
        // TODO add your handling code here:
        this.setKeys(this.cantidadADevolver, "0123456789.", null, true);       
    }//GEN-LAST:event_cantidadADevolverKeyReleased

    private void jTextField4KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextField4KeyReleased
        // TODO add your handling code here:
        this.setKeys(this.jTextField4,"012345679",null,true);
    }//GEN-LAST:event_jTextField4KeyReleased

    private void jTextField5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField5ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTextField5ActionPerformed

    private void campoProductoPedidoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_campoProductoPedidoKeyReleased
        // TODO add your handling code here:
        Panaderia.setHayOperacionEnCurso(this);
        if (!this.campoProductoPedido.getText().trim().isEmpty())
            this.mostrarProductosDonde(this.campoProductoPedido.getText().trim(),this.tablaProdPed);
        else
        {
            this.borrarTabla((DefaultTableModel) this.tablaProdPed.getModel());
            if (tablaDetalleProducto.getRowCount() == 0)
                Panaderia.setHayOperacionEnCurso(false);
        }
        if (this.tablaProdPed.getRowCount() != 0)
            this.unidadProdPed.setText( this.tablaProdPed.getValueAt(0, 4).toString() );
    }//GEN-LAST:event_campoProductoPedidoKeyReleased

    private void tablaProdPedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaProdPedMouseClicked
        // TODO add your handling code here:
          this.unidadProdPed.setText( this.tablaProdPed.getValueAt(this.tablaProdPed.getSelectedRow(),4).toString() );
    }//GEN-LAST:event_tablaProdPedMouseClicked

    private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed
        // TODO add your handling code here:
        if (this.cantPedido.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(null,"Debe ingresar la cantidad de articulos a incluir en el pedido","ERROR",2);
            return;
        }

        this.transferirProductos(this.tablaProdPed,this.tablaPedido, 3,Integer.parseInt(this.cantPedido.getText().trim()) );
        this.calcularTotal2(this.tablaPedido, this.jLabel104);
        this.cantPedido.setText("");
        if (this.tablaProdPed.getRowCount() == 0 )
        {
            this.jButton24.setEnabled(false);
            this.jButton22.setEnabled(true);
        }
        else
            this.jButton24.setEnabled(true);
    }//GEN-LAST:event_jButton28ActionPerformed

    private void jButton29ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton29ActionPerformed
        // TODO add your handling code here:
         if (this.cantPedido.getText().isEmpty())
        {
            JOptionPane.showMessageDialog(null,"Debe ingresar la cantidad de articulos a incorporar al pedido","ERROR",2);
            return;
        }
        this.transferirProductos(this.tablaPedido, this.tablaProdPed, 3,Integer.parseInt(this.cantPedido.getText().trim()) );
        this.calcularTotal2(this.tablaPedido, this.jLabel75);
        this.cantidadADevolver.setText("");

        if( this.tablaPedido.getRowCount() == 0 )
        {
            this.jButton24.setEnabled(false);
            this.jButton22.setEnabled(false);
        }
    }//GEN-LAST:event_jButton29ActionPerformed

    private void mostrarMenuContextual(java.awt.event.MouseEvent evt){
        if (evt.isPopupTrigger())
            this.jPopupMenu1.show(evt.getComponent(),evt.getX(),evt.getY());
    }


    

 /******************************************************************************************
  *                           Métodos para realizar venta                                  *
  ******************************************************************************************/


    /**
     * Agrega productos a la línea de venta
     * @throws Exception
     */
    public void agregarProducto() throws Exception{
        DefaultTableModel datos = (DefaultTableModel) this.tablaDetalleProducto.getModel();
        float cantidad = 0;
        float subtotal;
        float precio;
        int fila;
      
        try{
            // Validamos que el usuario haya ingresado el nombre de un producto
            if ( this.campoProducto.getText().trim().isEmpty() && this.tablaProducto.getRowCount() == 0)
                throw new NoSeSeleccionoProductoExcepcion("No se ingreso ningún producto...\nPor favor, ingrese el nombre del producto.");

            // Si no encontramos ningun producto con el nombre solicitado, se lo advertimos al usuario
            if( this.tablaProducto.getRowCount() == 0 )
                throw new NoSeSeleccionoProductoExcepcion("No se encontró ningún producto con el nombre solicitado...");

            // Si se tuvo un sólo producto como resultado de la búsqueda, no se requerirá que el usuario seleccione un producto
            if( this.tablaProducto.getRowCount() == 1 )
                fila = 0;
            else
                // En caso de que se encuentra más de un producto con el mismo nombre, el usuario deberá seleccionar el que desea
                fila = this.tablaProducto.getSelectedRow();

            // En caso de que el usuario deba seleccionar un producto, si no lo hizo, advertimos que deberá hacerlo para continuar
            if ( fila == -1 )
                throw new NoSeSeleccionoProductoExcepcion("Existe mas de un producto con el nombre ingresado...\nSeleccione uno");

            
            int stock = new Integer( this.tablaProducto.getValueAt(fila, 3).toString() );
            if (stock == 0)
                throw new ProductoNoDisponibleExcepcion( this.tablaProducto.getValueAt(fila,1).toString());


            if ( this.campoCantidad.getText().trim().isEmpty( ) )
                throw new CantidadVaciaExcepcion();


            cantidad = new Float( this.campoCantidad.getText().trim() );


            if (cantidad <= 0)
                throw new CantidadIncorrectaExcepcion("La cantidad ingresada no es correcta, debe ser un número mayor que 0.");

            if (cantidad > 100)
            {
                int opcion;
                opcion = JOptionPane.showConfirmDialog(this, "Está seguro que la cantidad ingresada es correcta?", "Cuidado!", JOptionPane.YES_NO_OPTION);
                if (opcion != 0)
                    return;
            }
            
            if ( ( stock - cantidad ) < 0 )
                throw new CantidadNoDisponibleExcepcion();


            precio = new Float(this.tablaProducto.getValueAt(fila,5).toString());
            subtotal = cantidad * precio;

            NumberFormat nf = NumberFormat.getInstance(Locale.UK);
            nf.setMinimumFractionDigits(2);


            // Cargamos un arreglo con los datos que vamos a poner en la tabla del detalle de la venta
            String [] producto = {
                this.tablaProducto.getValueAt(fila,0).toString(),
                this.tablaProducto.getValueAt(fila,1).toString(),
                this.tablaProducto.getValueAt(fila,2).toString(),
                this.campoCantidad.getText().trim(),
                nf.format(subtotal)
            };

            datos.addRow(producto);
            this.tablaDetalleProducto.setModel(datos);
            this.calcularTotal(this.tablaDetalleProducto,this.jLabel46);
            this.campoProducto.setText("");
            this.campoCantidad.setText("");

            this.botonQuitar.setEnabled(true);
            this.botonImprimirComp.setEnabled(true);
            this.botonEfectivo.setEnabled(true);

            if( this.tablaDetalleProducto.getRowCount() > 1 )
                this.botonVaciarDetalle.setEnabled(true);
            

        }        
        catch (Exception e)
        {
            if (e instanceof VentaExcepcion)
                throw e;
            else
                throw new CantidadIncorrectaExcepcion("La cantidad ingresada no es correcta, debe ingresar un número");
        }
      
    }


    /**
     * Calcula el importe total de la venta y lo presenta en pantalla
     */
    public void calcularTotal(JTable tabla, JLabel etiqueta){
        float total = 0 ;
        // ver calculos con number format
        
        NumberFormat nf = NumberFormat.getInstance(Locale.UK);
        nf.setMinimumFractionDigits(2);


        for (int i = 0; i < tabla.getRowCount();i++)
        {
            float parcial = new Float(tabla.getValueAt(i,4).toString());
            total = total + parcial;
        }
        etiqueta.setText("$ "+nf.format(total));

    }


    /**
     * Calcula y muestra el total del importe a devolver
     *
     * @param tabla de la cual se van a tomar elementos
     * @param etiqueta la etiqueta de la toma el valor del total
     */
    public void calcularTotal2(JTable tabla, JLabel etiqueta){
        float total = 0 ;
        // ver calculos con number format

        NumberFormat nf = NumberFormat.getInstance(Locale.UK);
        nf.setMinimumFractionDigits(2);


        for (int i = 0; i < tabla.getRowCount();i++)
        {
            float parcial = new Float(tabla.getValueAt(i,3).toString()) * new Float(tabla.getValueAt(i,4).toString());
            total = total + parcial;
        }
        etiqueta.setText("$ "+nf.format(total));

    }

    /**
     * Restea los formularios para poder realizar una nueva venta
     */
    public void limpiarVenta(){

        this.borrarTabla((DefaultTableModel) this.tablaDetalleProducto.getModel());
        Panaderia.setHayOperacionEnCurso(false);
        this.calcularTotal(this.tablaDetalleProducto,this.jLabel46);
        this.etiquetaEfectivo.setText("$ 0.00");
        this.etiquetaCambio.setText("$ 0.00");

        this.botonQuitar.setEnabled(false);
        this.botonVaciarDetalle.setEnabled(false);
    }


    /**
     * Restaura los valores de todos los componentes del panel de venta
     */
    public void limpiarDevolucionDinero()
    {
        this.borrarTabla((DefaultTableModel) this.jTable3.getModel());
        this.borrarTabla((DefaultTableModel) this.jTable4.getModel());
        this.calcularTotal(this.tablaDetalleProducto,this.jLabel46);
        this.numero2.setText("");
        this.fecha2.setText("");
        this.hora2.setText("");
        this.jLabel75.setText("");
        Panaderia.setHayOperacionEnCurso(false);
    }

    /**
     * Muestra todos los datos del cliente en relación a su nombre
     * @param nombre del producto a mostrar
     */
    public void mostrarClientesDonde(String nombre, JTable tabla){

            DefaultTableModel datos = (DefaultTableModel) tabla.getModel();
            for (int i = tabla.getRowCount()-1; i >= 0; i--)
            {
                datos.removeRow(i);
                tabla.setModel(datos);
            }

            try{
                tabla.setModel(this.panaderia.obtenerClientes(datos,nombre));
            }
            catch (Exception ex) {
                JOptionPane.showMessageDialog(null,"Hubo un problema al obtener todos los socios..."+ex.getMessage(),"ERROR",2);
            }
    }


    /**
     * Muestra el detalle del producto agregado en la línea de venta
     * @param nombre del producto a mostrar
     */
    public void mostrarProductosDonde(String nombre, JTable tabla){
    
            DefaultTableModel datos = (DefaultTableModel) tabla.getModel();
            for (int i = tabla.getRowCount()-1; i >= 0; i--)
            {
                datos.removeRow(i);
                tabla.setModel(datos);
            }
            
            try{
                tabla.setModel(this.panaderia.obtenerProductosDonde(datos,nombre));
            }
            catch (Exception ex) {
                JOptionPane.showMessageDialog(null,"Hubo un problema al obtener todos los socios..."+ex.getMessage(),"ERROR",2);
            }
    }


    public void mostrarVolumenVentas(java.sql.Date fecha1,java.sql.Date fecha2){
        try {
            DefaultTableModel datos = (DefaultTableModel) this.jTable2.getModel();
            this.borrarTabla(datos);
            this.jTable2.setModel(this.panaderia.obtenerVolumenVentas(datos,fecha1,fecha2));
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(null,"Hubo un problema al obtener todos los socios..."+ex.getMessage(),"ERROR",2);
        }
    }


    public void limpiarPanelListado(){
        this.jPanel5.setVisible(false);
        this.jPanel6.setVisible(false);
        this.jPanel18.setVisible(false);
        this.jPanel38.setVisible(false);
    }

    public void limpiarPanelCliente(){
        this.jPanel21.setVisible(false);
        this.jPanel22.setVisible(false);
        this.jPanel23.setVisible(false);
        this.jPanel24.setVisible(false);
    }

    public void limpiarPanelProducto(){
        this.jPanel2.setVisible(false);
        this.jPanel16.setVisible(false);
        this.jPanel17.setVisible(false);
        this.jPanel3.setVisible(false);
    }

    public void limpiarPanelDevolucion(){
        this.jPanel31.setVisible(false);
        this.jPanel32.setVisible(false);
        this.jPanel33.setVisible(false);
        this.jPanel12.setVisible(false);
    }

    public void vaciarCamposClienteMayorista(){
        this.campoRazonSocial.setText("");
        this.campoCuit.setText("");
        this.campoCalleCliente.setText("");
        this.campoTitular.setText("");
        this.campoNroCliente.setText("");
        this.campoDeptoCliente.setText("");
        this.campoLocalidad.setText("");
        this.campoEmail.setText("");
        this.campoTel.setText("");
    }

    public void vaciarCamposClienteMinorista(){
        this.campoNYA.setText("");
        this.campoDNI.setText("");
        this.campoCalle.setText("");
        this.campoNro.setText("");
        this.campoDepto.setText("");
        this.campoTelefono.setText("");
    }


  /******************************************************************************************
  *                           Fin métodos para realizar ventas                              *
  ******************************************************************************************/




    /******************************************************************************************
     *                           Métodos de la interfaz gráfica                               *
     ******************************************************************************************/

    /**
     *  Método para no permitir el ingreso de caracteres al seleccionar tamaño del buffer
     */
    private void setKeys(JTextComponent textComponent,final String enable,final String disable,final boolean disablePaste) {
    textComponent.addKeyListener(new KeyAdapter() {

            @Override
            public void keyTyped(KeyEvent evt) {
            char c = evt.getKeyChar();
            if (enable != null && enable.indexOf(c) == -1) {
                evt.consume();
                return;
            }
            if (disable != null && disable.indexOf(c) > -1) {
                evt.consume();
                return;
            }
        }

        @Override
        public void keyPressed(KeyEvent evt){
            char c = evt.getKeyChar();
            int modif=evt.getModifiers();
            if (disablePaste && c == '\u0016' && modif == KeyEvent.CTRL_MASK) {
                evt.consume();
                return;
            }
        }

    });

    }

    /**
     * Muestra un menu principal
     * @param empleado empleado logueado en el sistema
     */
    public void dibujarMenuPrincipal(Empleado empleado){
        if (empleado.getTipoEmpleado().equals("gerente"))
        {
                this.panaderia.mostrarMenuGerente();
        }
        else
        {
            if (empleado.getTipoEmpleado().equals("administrador"))
            {
                this.panaderia.mostrarMenuAdministrador();
            }
            else
            {
                this.panaderia.mostrarMenuEmpleadoDeVentas();
            }
        }
     }

    /**
     * Muestra las funcionalidades que puede realizar el gerente de la empresa
     */
    public void dibujarMenuGerente(){
        this.deshabilitarBarraHerramietasArchivo();
        this.jMenuItem2.setVisible(true);
        this.jMenuItem3.setVisible(true);
        this.jMenuItem4.setVisible(true);
        this.jMenuItem5.setVisible(true);
        this.jMenuItem6.setVisible(true);
        this.jMenuItem7.setVisible(true);
        this.jMenuItem10.setVisible(true);
        this.jMenuItem11.setVisible(true);
        this.jMenuItem12.setVisible(true);
        this.menuGerente.setVisible(true);
    }

    /**
     * Muestra las funcionalidades que puede realizar el administrador de la empresa
     */
    public void dibujarMenuAdministrador(){
        this.deshabilitarBarraHerramietasArchivo();
        this.jMenuItem2.setVisible(true);//*
        this.jMenuItem3.setVisible(true);//*
        this.jMenuItem4.setVisible(true);//*
        this.jMenuItem5.setVisible(true);//*
        this.jMenuItem9.setVisible(true);//*
        this.jMenuItem10.setVisible(true);//*
        this.jMenuItem11.setVisible(true);//*
        this.menuAdministrador.setVisible(true);
    }

    /**
     * Muestra la funcionalidades que puede realizar un empleado de ventas de la empresa
     */
    public void dibujarMenuEmpleadoDeVentas(){
        this.deshabilitarBarraHerramietasArchivo();
        this.jMenuItem3.setVisible(true);
        this.jMenuItem14.setVisible(true);
        this.jMenuItem5.setVisible(true);
        this.jMenuItem10.setVisible(true);
        this.jMenuItem11.setVisible(true);
        this.menuEmpleadoDeVentas.setVisible(true);
    }

    /**
     * Oculta el login de usuarios
     */
    public void dibujarOcultarLogIn()
    {
        this.panelLogin.setVisible(false);
    }

    /**
     * Muestra el panel de login del sistema
     * @param empleado
     */
    public void dibujarMostrarLogIn(Empleado empleado)
    {
        if (empleado.getTipoEmpleado().equals("gerente"))
        {
                this.menuGerente.setVisible(false);
        }
        else
        {
            if (empleado.getTipoEmpleado().equals("administrador"))
            {
                this.menuAdministrador.setVisible(false);
            }
            else
            {
                this.menuEmpleadoDeVentas.setVisible(false);
            }
        }
        this.limpiarPantalla();
        this.deshabilitarBarraHerramietasArchivo();
        this.panelLogin.setVisible(true);
        this.nombreusuario.setText("");
        this.passwordUsuario.setText("");
    }


    /**
     * muestra el panel de registro de un nuevo usuario
     */
    public void dibujarMenuNuevoUsuario() {

        if (Panaderia.isHayOperacionEnCurso() && !(Panaderia.getVentanaActiva() instanceof VistaUsuario))
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  if (VistaUsuario.vistaUsuario == null)
                  {
                        VistaUsuario vista = new VistaUsuario(this.panaderia);
                        vista.setVisible(true);
                        VistaUsuario.vistaUsuario = vista;
                  }
                  else
                  {
                        VistaUsuario.vistaUsuario.setVisible(true);
                  }
            }
        }
        else
        {
            if (VistaUsuario.vistaUsuario == null)
            {
                  VistaUsuario vista = new VistaUsuario(this.panaderia);
                  vista.setVisible(true);
                  VistaUsuario.vistaUsuario = vista;
            }
            else
            {
                  VistaUsuario.vistaUsuario.setVisible(true);
            }

        }
        Panaderia.setHayOperacionEnCurso(VistaUsuario.vistaUsuario);
     }

    /**
     * muestra el panel que permite registrar una nueva venta
     */
    public void dibujarMenuNuevaVenta(){
        this.limpiarPantalla();
        this.panelVenta.setVisible(true);
        this.jLabel22.setText(" Registrar Nueva Venta");
        // Creamos el menú siempre en blanco
        this.campoProducto.setText("");
        this.campoCantidad.setText("");
        this.campoEfectivo.setText("");
        this.borrarTabla((DefaultTableModel) this.tablaProducto.getModel());
        this.limpiarVenta();// limpia el detalle venta, y resetea los valores total, efectivo y cambio
        this.botonEfectivo.setEnabled(false);
        this.botonImprimirComp.setEnabled(false);
        this.botonRegistrar.setEnabled(false);
    }

    /**
     * Muestra el menu de la gestión de productos
     */
    public void dibujarMenuGestionProductos(){
        this.limpiarPantalla();
        this.panelProducto.setVisible(true);
        this.limpiarPanelProducto();
        this.jPanel2.setVisible(true);
        this.jLabel2.setText(" Productos");
    }

    /**
     * muestra el menu de gestión de pedidos
     */
    public void dibujarMenuGestionPedidos(){
        this.limpiarPantalla();
        this.panelPedido.setVisible(true);
        this.jLabel18.setText(" Pedidos");
    }

    /**
     * Muestra el menu que permite gestionar el stock de productos de la empresa
     */
    public void dibujarMenuGestionStock(){
        this.limpiarPantalla();
        this.panelStock.setVisible(true);
    }

    /**
     * Muestra el menu que permite gestionar los clientes
     */
    public void dibujarMenuGestionClientes(){
        this.limpiarPantalla();
        this.panelCliente.setVisible(true);
        this.limpiarPanelCliente();
        this.jPanel24.setVisible(true);
        this.jLabel12.setText(" Clientes");
        if (jPanel22.isVisible())
            this.vaciarCamposClienteMayorista();
        else
            this.vaciarCamposClienteMinorista();
    }

    /**
     * Muestra el menu de gestiones de devoluciones
     */
    public void dibujarMenuGestionDevoluciones(){
        this.limpiarPantalla();
        this.panelDevolucion.setVisible(true);
        this.limpiarPanelDevolucion();
        this.jPanel12.setVisible(true);
        this.jLabel16.setText(" Devoluciones");
    }

    /**
     * Muesrta el menu de gestion de cuenta corriente de clientes de la empresa
     */
    public void dibujarMenuGestionCtaCte(){
        this.limpiarPantalla();
        this.panelCtaCte.setVisible(true);
    }

    /**
     * muestra el menu de listados correspondiente al usuario actual
     */
    public void dibujarMenuGestionListados(){
        this.limpiarPantalla();
        //deshabilitamos los botones
        this.botonListarClientes.setVisible(false);
        this.botonListarPedidos.setVisible(false);
        this.botonListarProductos.setVisible(false);
        this.botonListarVentas.setVisible(false);

        this.limpiarPanelListado();

        this.panelListado.setVisible(true);
        this.jPanel6.setVisible(true);
        this.jLabel14.setText("Listados");

        if( this.panaderia.getEmpleado().getTipoEmpleado().equals("empleado de ventas") )
        {
            this.botonListarClientes.setVisible(true);
            this.botonListarProductos.setVisible(true);
        }
        else
        {
            if( this.panaderia.getEmpleado().getTipoEmpleado().equals("administrador") || this.panaderia.getEmpleado().getTipoEmpleado().equals("gerente") )
            {
                this.botonListarProductos.setVisible(true);
                this.botonListarClientes.setVisible(true);
                this.botonListarVentas.setVisible(true);
                this.botonListarPedidos.setVisible(true);
            }
        }


        
    }

    /**
     * Muestra el menu que permite gestionar los empleados de la empresa
     */
    public void dibujarMenuGestionEmpleados(){
        if (Panaderia.isHayOperacionEnCurso() && !(Panaderia.getVentanaActiva() instanceof VistaGestionEmpleados))
        {
            int opcion;
            opcion = JOptionPane.showConfirmDialog(Panaderia.getVentanaActiva(),"Hay operaciones en curso, si continua podria perderse información...\nDesea continuar?", "Cuidado!", JOptionPane.YES_NO_OPTION);
            if (opcion == 0)
            {
                  Panaderia.getVentanaActiva().setVisible(false);
                  Panaderia.setHayOperacionEnCurso(false);
                  if (VistaGestionEmpleados.vistaGestionEmpleados == null)
                  {
                    VistaGestionEmpleados vista = new VistaGestionEmpleados(this.panaderia);
                    vista.setVisible(true);
                    VistaGestionEmpleados.vistaGestionEmpleados = vista;
                  }
                  else
                  {
                    VistaGestionEmpleados.vistaGestionEmpleados.setVisible(true);
                    VistaGestionEmpleados.vistaGestionEmpleados.cargarUsuarios();
                  }
            }
        }
        else
        {
            if (VistaGestionEmpleados.vistaGestionEmpleados == null)
            {
                VistaGestionEmpleados vista = new VistaGestionEmpleados(this.panaderia);
                vista.setVisible(true);
                VistaGestionEmpleados.vistaGestionEmpleados = vista;
            }
            else
            {
                VistaGestionEmpleados.vistaGestionEmpleados.setVisible(true);
                VistaGestionEmpleados.vistaGestionEmpleados.cargarUsuarios();
            }
        }
        Panaderia.setHayOperacionEnCurso(VistaGestionEmpleados.vistaGestionEmpleados);
    }

    public void dibujarMenuConfiguracion(){
        this.limpiarPantalla();
        this.panelConfiguracion.setVisible(true);
    }


    public void dibujarVentanaGuardarExcel(JTable tabla) {
        if (tabla.getRowCount() != 0)
        {
            GuardarExcel ge = new GuardarExcel(tabla);
            ge.setVisible(true);
        }
        else
            JOptionPane.showMessageDialog(this,"No se encontraron datos para exportar a Excel...","ERROR",2);

    }

    public void dibujarVentanaGrafico(JTable tabla){

        ArrayList <String> nombre = new ArrayList<String>();
        ArrayList <Float> cantidad = new ArrayList<Float>();
        DefaultTableModel datos = (DefaultTableModel) tabla.getModel();

        if (datos.getRowCount() != 0)
        {
            for (int i=0;i < datos.getRowCount();i++)
            {
                nombre.add(i,tabla.getValueAt(i, 1).toString());
                cantidad.add(i,Float.parseFloat(tabla.getValueAt(i,4).toString()));
            }

            new Barra3D("Gráfico", "Volúmen de ventas", "Productos", "Volúmen", nombre, cantidad).setVisible(true);
        }
        else
            JOptionPane.showMessageDialog(this,"No se encontraron datos suficientes para realizar el gráfico...","ERROR",2);
    }


    /******************************************************************************************
     *                         Fin métodos de la interfaz gráfica                             *
     ******************************************************************************************/

   

 /**********************************************************************************************
 *                          Métodos de la interfaz gráfica                                     *
 *                                                                                             *
 ***********************************************************************************************/

    /**
     * Borra los paneles de la pantalla
     */
    public void limpiarPantalla(){
        this.panelConfiguracion.setVisible(false);
        this.panelCliente.setVisible(false);
        this.panelProducto.setVisible(false);
        this.panelPedido.setVisible(false);
        this.panelListado.setVisible(false);
        this.panelDevolucion.setVisible(false);
        this.panelVenta.setVisible(false);
        this.panelStock.setVisible(false);
        this.panelCtaCte.setVisible(false);
    }

    /**
     *  borra las opciones de la barra de herramientas correspondientes a la pestaña "Archivo"
     */
    public void deshabilitarBarraHerramietasArchivo (){
        this.jMenuItem2.setVisible(false);
        this.jMenuItem3.setVisible(false);
        this.jMenuItem4.setVisible(false);
        this.jMenuItem5.setVisible(false);
        this.jMenuItem6.setVisible(false);
        this.jMenuItem7.setVisible(false);
        this.jMenuItem9.setVisible(false);
        this.jMenuItem10.setVisible(false);
        this.jMenuItem11.setVisible(false);
        this.jMenuItem12.setVisible(false);
        this.jMenuItem14.setVisible(false);

    }

    /**
     * Muestra los detalles del producto ingresado
     */
    public void mostrarProducto(){

        DefaultTableModel datos = (DefaultTableModel) this.campoDetalleProductoAModificar.getModel();
        if (datos.getRowCount() !=0)
            datos.removeRow(0);
        this.campoDetalleProductoAModificar.setModel(this.panaderia.obtenerProducto(datos,jTextField5.getText().trim()));
    }

/**
 * Muestra todos los productos registrados en el sistema
 */
   public void mostrarProductos(){
        
        DefaultTableModel datos = (DefaultTableModel) this.tablaListadoProductos.getModel();
        this.tablaListadoProductos.setModel(this.borrarTabla(datos));
        this.tablaListadoProductos.setModel(this.panaderia.obtenerProductos(datos));
        this.limpiarPanelListado();
        this.jPanel5.setVisible(true);
        this.jLabel14.setText("Listados->Listar Productos");

   }

   /**
    * Borra el contenido de una tabla
    * @param datos
    * @return
    */
   public DefaultTableModel borrarTabla(DefaultTableModel datos){
       for (int i = datos.getRowCount()-1;i >= 0;i--)
           datos.removeRow(i);
       return datos;
   }

   /**
    * Muestra todos los clientes minoristas registrados en la empresa
    */
    public void mostrarClientesMinoristas(){
        DefaultTableModel datos = (DefaultTableModel) this.tablaClienteMinorista.getModel();
        this.tablaClienteMinorista.setModel(this.borrarTabla(datos));
        this.tablaClienteMinorista.setModel(this.panaderia.obtenerClientesMinoristas(datos));
   }

    /**
     * Muestra todos los clientes minoristas registrados en la empresa
     */
    public void mostrarClientesMayoristas(){

        DefaultTableModel datos = (DefaultTableModel) this.tablaClienteMayorista.getModel();
        this.tablaClienteMayorista.setModel(this.borrarTabla(datos));
        this.tablaClienteMayorista.setModel(this.panaderia.obtenerClientesMayoristas(datos));
   }

   public void mostrarTicketVenta(String nro_ticket, JTable tabla, JLabel numero, JLabel fecha, JLabel hora){
        DefaultTableModel datos = (DefaultTableModel) tabla.getModel();
        this.borrarTabla(datos);

        try {
            this.panaderia.obtenerDatosTicket(nro_ticket, numero,fecha,hora);
            tabla.setModel(this.panaderia.obtenerDetalleVenta(datos, nro_ticket));
        }
        catch (Exception ex) {
            if( ex instanceof TicketAnuladoExcepcion )
                JOptionPane.showMessageDialog(null,ex.getMessage(),"ERROR",2);
            else
                JOptionPane.showMessageDialog(null,"El número de ticket no existe...\nVerifique el número ingresado.","ERROR",2);
        }
   }


 /**********************************************************************************************
 *                          Fin métodos de la interfaz gráfica                                 *
 *                                                                                             *
 ***********************************************************************************************/

    /**
     *  Valida si el campo contiene un número con formato correcto de fecha. Un importe se considera válido, si en la
     *  parte decimal tiene hasta 5 dígitos, y en la parte decima a la sumo dos digitos. Ej: 12345.12
     * @param campo es el texto a analizar
     * @param mje mensaje que se imprimirá en pantalla en caso de error
     */
    public void detectarDatoCarac(JTextField campo, String mje)
    {
        Pattern p = Pattern.compile("^[0-9]{1,5}+(.?[0-9]{0,2})?$");

        Matcher m = p.matcher(campo.getText());
        if (!m.find() )
        {
            JOptionPane.showMessageDialog(null, mje, "ERROR", 2);
            campo.setText("");
        }
    }

  
   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton botonAgregar;
    private javax.swing.JButton botonAgregarCliente;
    private javax.swing.JButton botonAgregarPedido;
    private javax.swing.JButton botonAgregarProd;
    private javax.swing.JButton botonAgregarProducto;
    private javax.swing.JButton botonCanje;
    private javax.swing.JButton botonCtaCte;
    private javax.swing.JButton botonDevolucionDinero;
    private javax.swing.JButton botonDevolucionPedido;
    private javax.swing.JButton botonEfectivo;
    private javax.swing.JButton botonEliminarCliente;
    private javax.swing.JButton botonEliminarPedido;
    private javax.swing.JButton botonEliminarProducto;
    private javax.swing.JButton botonElimniar;
    private javax.swing.JButton botonImprimir;
    private javax.swing.JButton botonImprimirComp;
    private javax.swing.JButton botonListarClientes;
    private javax.swing.JButton botonListarPedidos;
    private javax.swing.JButton botonListarProductos;
    private javax.swing.JButton botonListarVentas;
    private javax.swing.JButton botonModificar;
    private javax.swing.JButton botonModificarCliente;
    private javax.swing.JButton botonModificarPedido;
    private javax.swing.JButton botonModificarProducto;
    private javax.swing.JButton botonQuitar;
    public javax.swing.JButton botonRegistrar;
    private javax.swing.JButton botonVaciarDetalle;
    private javax.swing.JButton botonVolver;
    private javax.swing.JButton botonVolverMenuListado;
    private javax.swing.JButton btnVolver;
    private javax.swing.JButton buttonVolver;
    private javax.swing.JButton cambiarDeUsuario;
    private javax.swing.JButton cambiarDeUsuario1;
    public javax.swing.JTextField campoCalle;
    public javax.swing.JTextField campoCalleCliente;
    public javax.swing.JTextField campoCantidad;
    private javax.swing.JTextField campoCodigo;
    private javax.swing.JTextField campoCodigoProducto;
    public javax.swing.JTextField campoCuit;
    public javax.swing.JTextField campoDNI;
    public javax.swing.JTextField campoDepto;
    public javax.swing.JTextField campoDeptoCliente;
    private javax.swing.JTextField campoDescripcion;
    public javax.swing.JTable campoDetalleProductoAModificar;
    public javax.swing.JTextField campoEfectivo;
    public javax.swing.JTextField campoEmail;
    public javax.swing.JTextField campoLocalidad;
    public javax.swing.JTextField campoNYA;
    private javax.swing.JTextField campoNombre;
    public javax.swing.JTextField campoNro;
    public javax.swing.JTextField campoNroCliente;
    public javax.swing.JTextField campoPiso;
    public javax.swing.JTextField campoPisoCliente;
    private javax.swing.JTextField campoPrecioUnitario;
    public javax.swing.JTextField campoProducto;
    private javax.swing.JTextField campoProductoPedido;
    public javax.swing.JTextField campoRazonSocial;
    private javax.swing.JTextField campoStock;
    public javax.swing.JTextField campoTel;
    public javax.swing.JTextField campoTelefono;
    public javax.swing.JTextField campoTitular;
    private javax.swing.JTextField cantPedido;
    private javax.swing.JTextField cantidadADevolver;
    private javax.swing.JComboBox comboUnidad;
    private javax.swing.JLabel contraseña;
    public javax.swing.JLabel etiquetaCambio;
    public javax.swing.JLabel etiquetaEfectivo;
    private javax.swing.JLabel fecha;
    private javax.swing.JLabel fecha2;
    private javax.swing.JLabel fechaDesde;
    private javax.swing.JLabel fechaHasta;
    private javax.swing.JLabel fechaTicket;
    private javax.swing.JButton gestionClientes;
    private javax.swing.JButton gestionClientes1;
    private javax.swing.JButton gestionClientes2;
    private javax.swing.JButton gestionCtaCte;
    private javax.swing.JButton gestionDevoluciones;
    private javax.swing.JButton gestionDevoluciones1;
    private javax.swing.JButton gestionDevoluciones2;
    private javax.swing.JButton gestionEmpleados;
    private javax.swing.JButton gestionPedidos;
    private javax.swing.JButton gestionPedidos1;
    private javax.swing.JButton gestionProductos;
    private javax.swing.JButton gestionProductos1;
    private javax.swing.JButton gestionStock;
    private javax.swing.JButton gestionUsuario;
    private javax.swing.JButton gestionVenta;
    private javax.swing.JLabel hora;
    private javax.swing.JLabel hora2;
    private javax.swing.JLabel horaTicket;
    private javax.swing.JButton ingresar;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton15;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton17;
    private javax.swing.JButton jButton18;
    private javax.swing.JButton jButton19;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton20;
    private javax.swing.JButton jButton21;
    private javax.swing.JButton jButton22;
    private javax.swing.JButton jButton23;
    private javax.swing.JButton jButton24;
    private javax.swing.JButton jButton25;
    private javax.swing.JButton jButton26;
    private javax.swing.JButton jButton27;
    private javax.swing.JButton jButton28;
    private javax.swing.JButton jButton29;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton30;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox3;
    private javax.swing.JCheckBox jCheckBox4;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox3;
    private com.toedter.calendar.JDateChooser jDateChooser1;
    private com.toedter.calendar.JDateChooser jDateChooser2;
    private com.toedter.calendar.JDateChooser jDateChooser3;
    private com.toedter.calendar.JDateChooser jDateChooser4;
    private com.toedter.calendar.JDateChooser jDateChooser5;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel100;
    private javax.swing.JLabel jLabel101;
    private javax.swing.JLabel jLabel102;
    private javax.swing.JLabel jLabel103;
    private javax.swing.JLabel jLabel104;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    public javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel75;
    private javax.swing.JLabel jLabel76;
    private javax.swing.JLabel jLabel77;
    private javax.swing.JLabel jLabel78;
    private javax.swing.JLabel jLabel79;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel80;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel85;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel88;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JLabel jLabel92;
    private javax.swing.JLabel jLabel93;
    private javax.swing.JLabel jLabel94;
    private javax.swing.JLabel jLabel95;
    private javax.swing.JLabel jLabel96;
    private javax.swing.JLabel jLabel97;
    private javax.swing.JLabel jLabel98;
    private javax.swing.JLabel jLabel99;
    private javax.swing.JLayeredPane jLayeredPane1;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenuItem jMenuItem12;
    private javax.swing.JMenuItem jMenuItem13;
    private javax.swing.JMenuItem jMenuItem14;
    private javax.swing.JMenuItem jMenuItem15;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem7;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPopupMenu jPopupMenu1;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JRadioButton jRadioButton4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    public javax.swing.JTable jTable3;
    private javax.swing.JTable jTable4;
    private javax.swing.JTable jTable5;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField9;
    private javax.swing.JButton listados;
    private javax.swing.JButton listados1;
    private javax.swing.JButton listados2;
    private javax.swing.JPanel menuAdministrador;
    private javax.swing.JPanel menuEmpleadoDeVentas;
    private javax.swing.JPanel menuGerente;
    private javax.swing.JTextField nombreusuario;
    private javax.swing.JLabel nroTicket;
    private javax.swing.JLabel numero;
    public javax.swing.JLabel numero2;
    private javax.swing.JPanel panelCliente;
    private javax.swing.JPanel panelConfiguracion;
    private javax.swing.JPanel panelCtaCte;
    private javax.swing.JPanel panelDevolucion;
    private javax.swing.JPanel panelListado;
    private javax.swing.JPanel panelLogin;
    private javax.swing.JPanel panelPedido;
    private javax.swing.JPanel panelProducto;
    private javax.swing.JPanel panelStock;
    private javax.swing.JPanel panelVenta;
    private javax.swing.JPasswordField passwordUsuario;
    private javax.swing.JLabel registroDeUsuario;
    private javax.swing.JButton salir;
    private javax.swing.JTable tablaCliente;
    private javax.swing.JTable tablaClienteMayorista;
    private javax.swing.JTable tablaClienteMinorista;
    public javax.swing.JTable tablaDetalleProducto;
    private javax.swing.JTable tablaListadoProductos;
    private javax.swing.JTable tablaPedido;
    private javax.swing.JTable tablaProdPed;
    public javax.swing.JTable tablaProducto;
    private javax.swing.JScrollPane tablaProductoAModifica;
    private javax.swing.JLabel unidadProdPed;
    private javax.swing.JLabel usuario;
    // End of variables declaration//GEN-END:variables

}
